Only reload logs on save if checkboxes changed
This commit is contained in:
parent
db6ddea0ed
commit
e4738b6d9b
24
options.py
24
options.py
@ -233,6 +233,11 @@ class Settings(QtGui.QDialog):
|
|||||||
main_layout.addLayout(save_layout)
|
main_layout.addLayout(save_layout)
|
||||||
|
|
||||||
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"):
|
||||||
@ -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,14 +342,17 @@ 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 self.savedemos.isChecked():
|
if not (self.savelogs_state == self.savetolog.isChecked() and self.combinelogs_state == self.savetolog_combine.isChecked()):
|
||||||
self.gamewindow.gamewidget.start_demo_recorder()
|
self.gamewindow.gamewidget.ooclog.set_logfiles()
|
||||||
else:
|
self.gamewindow.gamewidget.icLog.set_logfiles(self.gamewindow.gamewidget.ooclog.logfile)
|
||||||
self.gamewindow.gamewidget.demo_recorder = None
|
|
||||||
|
if not self.savedemos_state == self.savedemos.isChecked():
|
||||||
|
if self.savedemos.isChecked():
|
||||||
|
self.gamewindow.gamewidget.start_demo_recorder()
|
||||||
|
else:
|
||||||
|
self.gamewindow.gamewidget.demo_recorder = None
|
||||||
|
|
||||||
self.hide()
|
self.hide()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user