aboutsummaryrefslogtreecommitdiff
path: root/mainwindow.py
diff options
context:
space:
mode:
authortassaron2017-06-13 22:47:18 -0400
committertassaron2017-06-13 22:47:18 -0400
commit2ad14b7d6ca9216bcdc72c5e13937fcbccc887a3 (patch)
tree489dfd5ef2c125040fbf04415ba139fb5798c56b /mainwindow.py
parent307d499f9ae2729c790fe9258d88aca72331cdf6 (diff)
asterisk next to modified preset is more accurate
hopefully
Diffstat (limited to 'mainwindow.py')
-rw-r--r--mainwindow.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/mainwindow.py b/mainwindow.py
index 2a04a4a..3ea4f58 100644
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -235,9 +235,17 @@ class MainWindow(QtCore.QObject):
self.previewThread.wait()
self.autosave()
- @QtCore.pyqtSlot(int, bool)
- def updateComponentTitle(self, pos, modified=False):
- #print(pos, modified)
+ @QtCore.pyqtSlot(int, dict)
+ def updateComponentTitle(self, pos, presetStore=False):
+ if type(presetStore) == dict:
+ name = presetStore['preset']
+ if name == None:
+ modified = False
+ else:
+ modified = (presetStore != self.core.savedPresets[name])
+ else:
+ print(pos, presetStore)
+ modified = bool(presetStore)
if pos < 0:
pos = len(self.core.selectedComponents)-1
title = str(self.core.selectedComponents[pos])
@@ -246,10 +254,6 @@ class MainWindow(QtCore.QObject):
if modified:
title += '*'
self.window.listWidget_componentList.item(pos).setText(title)
- if modified:
- self.core.componentModified(pos)
- else:
- self.core.componentUnmodified(pos)
def updateCodecs(self):
containerWidget = self.window.comboBox_videoContainer
@@ -521,6 +525,8 @@ class MainWindow(QtCore.QObject):
"Project Files (*.avp)")
if not filename:
return
+ if not filename.endswith(".avp"):
+ filename += '.avp'
self.settings.setValue("projectDir", os.path.dirname(filename))
self.settings.setValue("currentProject", filename)
self.currentProject = filename