From 2768084b30da136dcfcb0c4e2e4264ad66083e4e Mon Sep 17 00:00:00 2001 From: tassaron Date: Thu, 1 Jun 2017 20:31:15 -0400 Subject: resolution comboBox gets updated --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ba62c2c..8bbbf08 100644 --- a/main.py +++ b/main.py @@ -354,7 +354,7 @@ class Main(QtCore.QObject): if not os.path.exists(destination): os.makedirs(destination) for f in os.listdir(destination): - self.window.comboBox_openPreset.addItem(f) + self.window.comboBox_openPreset.addItem(f) def openSavePresetDialog(self): if self.window.listWidget_componentList.currentRow() == -1: @@ -476,6 +476,11 @@ class Main(QtCore.QObject): os.rename(settingsPath, backupPath) shutil.copyfile(projSettingsPath, settingsPath) self.settings.sync() + currentRes = str(self.settings.value('outputWidth'))+'x'+str(self.settings.value('outputHeight')) + for i in range(self.window.comboBox_resolution.count()-1): + if self.window.comboBox_resolution.itemText(i) == currentRes: + self.window.comboBox_resolution.setCurrentIndex(i) + break def showMessage(self, string, icon=QtGui.QMessageBox.Information, showCancel=False): msg = QtGui.QMessageBox() -- cgit v1.2.3