Debug: visible label docIndex/editMode/contentLen + qDebug in openDocument/setActiveIndex + loadContent console.log

This commit is contained in:
Flora (opencode)
2026-08-17 16:38:22 +03:00
parent 768f08eda5
commit 795d9e52df
2 changed files with 18 additions and 1 deletions
+15 -1
View File
@@ -233,6 +233,18 @@ Item {
placeholderText: qsTr("Документ не выбран")
}
// Отладочный индикатор (временно)
Label {
visible: true
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.margins: 4
font.pixelSize: 10
color: "#999"
text: "docIndex=" + pane.docIndex + " editMode=" + pane.editMode
+ " contentLen=" + editor.text.length
}
TextArea {
id: viewer
anchors.fill: parent
@@ -251,11 +263,13 @@ Item {
// ---------- Просмотр (режим просмотра) ----------
function loadContent() {
console.log("loadContent called: docIndex=" + pane.docIndex + " editMode=" + pane.editMode)
if (pane.docIndex >= 0) {
const c = documentManager.contentAt(pane.docIndex)
console.log("loadContent content=" + c.substring(0, 50) + "...")
editor.text = c
pane.editorContent = c
console.log("loadContent docIndex=" + pane.docIndex + " len=" + c.length)
console.log("loadContent editor.text.length=" + editor.text.length)
} else {
editor.text = ""
pane.editorContent = ""