Fix: color:text на TextArea, автооткрытие первого .md файла, отладка цепочки openDocument→setActiveIndex→loadContent→editor.text (проверено: контент загружается, editor.text.length=21)

This commit is contained in:
Flora (opencode)
2026-08-17 17:29:23 +03:00
parent 795d9e52df
commit 18962473ae
3 changed files with 29 additions and 1 deletions
+23 -1
View File
@@ -53,8 +53,30 @@ ApplicationWindow {
fileStore.openVault(vaultManager.currentVault)
}
// Если хранилищ нет — мастер откроется автоматически.
if (vaultManager.vaults.length === 0)
if (vaultManager.vaults.length === 0) {
welcomeWizard.open()
} else {
// Автооткрытие первого .md файла для тестирования
autoOpenTimer.start()
}
}
Timer {
id: autoOpenTimer
interval: 200
onTriggered: {
if (!fileStore.ready) return
for (let i = 0; i < fileStore.rowCount(); i++) {
if (!fileStore.itemIsDir(i)) {
const p = fileStore.itemPath(i)
if (p.endsWith(".md")) {
documentManager.openDocument(p)
console.log("AUTO-OPENED:", p, "len:", documentManager.contentAt(documentManager.activeIndex).length)
break
}
}
}
}
}
menuBar: MenuBar {