aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.py
diff options
context:
space:
mode:
authortassaron2017-06-24 23:40:32 -0400
committertassaron2017-06-24 23:40:32 -0400
commit45b55d8e2fbffceefc9a1cd50b9bdb3e7ec9da78 (patch)
tree1843ee14acd04158fab3fbd9f471a6178820e1be /src/mainwindow.py
parente32ba958cb95146728d4985221b08c7e01b35470 (diff)
fixed lack of asterisks after openProject, added asterisk to window title
Diffstat (limited to 'src/mainwindow.py')
-rw-r--r--src/mainwindow.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mainwindow.py b/src/mainwindow.py
index 7a9e397..7fae4ea 100644
--- a/src/mainwindow.py
+++ b/src/mainwindow.py
@@ -286,6 +286,8 @@ class MainWindow(QtWidgets.QMainWindow):
appName += ' - %s' % \
os.path.splitext(
os.path.basename(self.currentProject))[0]
+ if self.autosaveExists(identical=False):
+ appName += '*'
self.window.setWindowTitle(appName)
@QtCore.pyqtSlot(int, dict)
@@ -490,6 +492,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.newTask.emit(self.core.selectedComponents)
# self.processTask.emit()
self.autosave(force)
+ self.updateWindowTitle()
def showPreviewImage(self, image):
self.previewWindow.changePixmap(image)
@@ -602,11 +605,11 @@ class MainWindow(QtWidgets.QMainWindow):
self.currentProject = None
self.settings.setValue("currentProject", None)
self.drawPreview(True)
- self.updateWindowTitle()
def saveCurrentProject(self):
if self.currentProject:
self.core.createProjectFile(self.currentProject)
+ self.updateWindowTitle()
else:
self.openSaveProjectDialog()
@@ -638,8 +641,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.settings.setValue("projectDir", os.path.dirname(filename))
self.settings.setValue("currentProject", filename)
self.currentProject = filename
- self.updateWindowTitle()
self.core.createProjectFile(filename)
+ self.updateWindowTitle()
def openOpenProjectDialog(self):
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
@@ -651,7 +654,6 @@ class MainWindow(QtWidgets.QMainWindow):
def openProject(self, filepath, prompt=True):
if not filepath or not os.path.exists(filepath) \
or not filepath.endswith('.avp'):
- self.updateWindowTitle()
return
self.clear()
@@ -660,7 +662,6 @@ class MainWindow(QtWidgets.QMainWindow):
self.openSaveChangesDialog('opening another project')
self.currentProject = filepath
- self.updateWindowTitle()
self.settings.setValue("currentProject", filepath)
self.settings.setValue("projectDir", os.path.dirname(filepath))
# actually load the project using core method