Skip to content

Commit 2642b8a

Browse files
committed
Fix document marked as changed upon app startup
Fix #364
1 parent e07c90b commit 2642b8a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/kirigami_ui/+android/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ Kirigami.ApplicationWindow {
132132
visibility: __fullScreen ? (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen) : (!__autoFullScreen ? Kirigami.ApplicationWindow.AutomaticVisibility : (parseInt(root.pageStack.currentItem.prompter.state)===Prompter.States.Editing ? Kirigami.ApplicationWindow.Maximized : (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen)))
133133

134134
onWidthChanged: {
135-
root.pageStack.currentItem.footer.paragraphSpacingSlider.update()
135+
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
136+
root.pageStack.currentItem.document.modified = false;
136137
}
137138

138139
// Open save dialog on closing

src/kirigami_ui/+windows/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Kirigami.ApplicationWindow {
143143
visibility: __fullScreen ? (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen) : (!__autoFullScreen ? Kirigami.ApplicationWindow.AutomaticVisibility : (parseInt(root.pageStack.currentItem.prompter.state)===Prompter.States.Editing ? Kirigami.ApplicationWindow.Maximized : (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen)))
144144

145145
onWidthChanged: {
146-
root.pageStack.currentItem.footer.paragraphSpacingSlider.update()
146+
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
147+
root.pageStack.currentItem.document.modified = false;
147148
}
148149

149150
// Open save dialog on closing

src/kirigami_ui/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Kirigami.ApplicationWindow {
143143
visibility: __fullScreen ? (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen) : (!__autoFullScreen ? Kirigami.ApplicationWindow.AutomaticVisibility : (parseInt(root.pageStack.currentItem.prompter.state)===Prompter.States.Editing ? Kirigami.ApplicationWindow.Maximized : (__fakeFullscreen ? Kirigami.ApplicationWindow.Maximized : Kirigami.ApplicationWindow.FullScreen)))
144144

145145
onWidthChanged: {
146-
root.pageStack.currentItem.footer.paragraphSpacingSlider.update()
146+
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
147+
root.pageStack.currentItem.document.modified = false;
147148
}
148149

149150
// Open save dialog on closing

src/prompter/Prompter.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ Flickable {
14591459
onError: (message) => {
14601460
errorDialog.text = message
14611461
errorDialog.visible = true
1462+
document.modified = false;
14621463
}
14631464

14641465
Component.onCompleted: {

0 commit comments

Comments
 (0)