Skip to content
Snippets Groups Projects
Commit a369ccf1 authored by Martijn Buijs's avatar Martijn Buijs Committed by Kentaro Wada
Browse files

If there are unsaved changes, show a asterisk in window title

parent 2e7f1101
No related branches found
No related tags found
No related merge requests found
......@@ -446,11 +446,13 @@ class MainWindow(QMainWindow, WindowMixin):
def setDirty(self):
self.dirty = True
self.actions.save.setEnabled(True)
self.setWindowTitle('{} - {}*'.format(__appname__, os.path.basename(self.filename)))
def setClean(self):
self.dirty = False
self.actions.save.setEnabled(False)
self.actions.create.setEnabled(True)
self.setWindowTitle('{} - {}'.format(__appname__, os.path.basename(self.filename)))
def toggleActions(self, value=True):
"""Enable/Disable widgets which depend on an opened image."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment