Only reload logs on save if checkboxes changed
This commit is contained in:
parent
db6ddea0ed
commit
e4738b6d9b
16
options.py
16
options.py
@ -234,6 +234,11 @@ class Settings(QtGui.QDialog):
|
|||||||
|
|
||||||
self.savebtn.setFocus()
|
self.savebtn.setFocus()
|
||||||
|
|
||||||
|
# If they're different from the respective checkbox on save, tell the gui to start/stop logging
|
||||||
|
self.savelogs_state = False
|
||||||
|
self.combinelogs_state = False
|
||||||
|
self.savedemos_state = False
|
||||||
|
|
||||||
def showSettings(self):
|
def showSettings(self):
|
||||||
if exists("AO2XP.ini"):
|
if exists("AO2XP.ini"):
|
||||||
self.inifile.read("AO2XP.ini")
|
self.inifile.read("AO2XP.ini")
|
||||||
@ -292,6 +297,10 @@ class Settings(QtGui.QDialog):
|
|||||||
for line in f:
|
for line in f:
|
||||||
self.callwords_edit.append(line.rstrip().decode("utf-8"))
|
self.callwords_edit.append(line.rstrip().decode("utf-8"))
|
||||||
|
|
||||||
|
self.savelogs_state = self.savetolog.isChecked()
|
||||||
|
self.combinelogs_state = self.savetolog_combine.isChecked()
|
||||||
|
self.savedemos_state = self.savedemos.isChecked()
|
||||||
|
|
||||||
self.tabs.setCurrentIndex(0)
|
self.tabs.setCurrentIndex(0)
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
@ -333,10 +342,13 @@ class Settings(QtGui.QDialog):
|
|||||||
f.write(self.callwords_edit.toPlainText().toUtf8())
|
f.write(self.callwords_edit.toPlainText().toUtf8())
|
||||||
|
|
||||||
self.gamewindow.gamewidget.text_wait_time = self.textstaytime.value()
|
self.gamewindow.gamewidget.text_wait_time = self.textstaytime.value()
|
||||||
self.gamewindow.gamewidget.ooclog.set_logfiles()
|
|
||||||
self.gamewindow.gamewidget.icLog.set_logfiles(self.gamewindow.gamewidget.ooclog.logfile)
|
|
||||||
self.gamewindow.gamewidget.slide_enabled = self.enableslide.isChecked()
|
self.gamewindow.gamewidget.slide_enabled = self.enableslide.isChecked()
|
||||||
|
|
||||||
|
if not (self.savelogs_state == self.savetolog.isChecked() and self.combinelogs_state == self.savetolog_combine.isChecked()):
|
||||||
|
self.gamewindow.gamewidget.ooclog.set_logfiles()
|
||||||
|
self.gamewindow.gamewidget.icLog.set_logfiles(self.gamewindow.gamewidget.ooclog.logfile)
|
||||||
|
|
||||||
|
if not self.savedemos_state == self.savedemos.isChecked():
|
||||||
if self.savedemos.isChecked():
|
if self.savedemos.isChecked():
|
||||||
self.gamewindow.gamewidget.start_demo_recorder()
|
self.gamewindow.gamewidget.start_demo_recorder()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user