Skip to content

Commit a05adb2

Browse files
committed
Fix modified status getting reset after window width change
1 parent 11c85c0 commit a05adb2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/kirigami_ui/+android/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ 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+
const modified = root.pageStack.currentItem.document.modified
135136
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
136-
root.pageStack.currentItem.document.modified = false;
137+
root.pageStack.currentItem.document.modified = modified;
137138
}
138139

139140
// 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,8 +143,9 @@ 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+
const modified = root.pageStack.currentItem.document.modified
146147
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
147-
root.pageStack.currentItem.document.modified = false;
148+
root.pageStack.currentItem.document.modified = modified;
148149
}
149150

150151
// 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,8 +143,9 @@ 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+
const modified = root.pageStack.currentItem.document.modified
146147
root.pageStack.currentItem.footer.paragraphSpacingSlider.update();
147-
root.pageStack.currentItem.document.modified = false;
148+
root.pageStack.currentItem.document.modified = modified;
148149
}
149150

150151
// Open save dialog on closing

0 commit comments

Comments
 (0)