Added visualization for unclean undo stack. (No safe guard before closing on an unclean stack yet.)

This commit is contained in:
2026-03-09 15:04:36 +01:00
parent d08325cc3c
commit 3e3aae63ae
2 changed files with 22 additions and 2 deletions

View File

@ -1,13 +1,19 @@
import QtQuick
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQml.Models
Window {
property bool isDataModified: !appUndoStack.isClean
property string titleClean: `${Application.name}`
property string titleDirty: `${Application.name}` + " *"
id: window
width: 480
height: 800
visible: true
title: `${Application.name}`
title: appUndoStack.clean ? titleClean : titleDirty
property int fontSize: 16
@ -29,4 +35,18 @@ Window {
id: listPage
anchors.fill: parent
}
Component.onCompleted: {
// core.displayStatusMessage.connect(displayStatusMessage)
appUndoStack.cleanChanged.connect(cleanChanged)
// core.userConfigChanged.connect(onUserConfigChanged)
}
function cleanChanged() {
let clean = appUndoStack.clean
console.debug("Clean state changed to: " + clean)
// if (!clean) {
// footerText.text = ""
// }
}
}

View File

@ -3,7 +3,7 @@
#include <QQmlContext>
#include <QUndoCommand>
#include <model/generalsortfiltermodel.h>
#include "model/generalsortfiltermodel.h"
#include "genericcore.h"