Fix non-updating screen when unchecking override

This commit is contained in:
Jon Tibble 2010-07-31 22:58:56 +01:00
parent 1cbf4333d8
commit e815a5ff08

View File

@ -38,6 +38,7 @@ class GeneralTab(SettingsTab):
""" """
self.screens = screens self.screens = screens
self.monitorNumber = 0 self.monitorNumber = 0
self.overrideChanged = False
SettingsTab.__init__(self, u'General') SettingsTab.__init__(self, u'General')
def preLoad(self): def preLoad(self):
@ -473,16 +474,18 @@ class GeneralTab(SettingsTab):
Receiver.send_message(u'slidecontroller_live_spin_delay', Receiver.send_message(u'slidecontroller_live_spin_delay',
self.timeoutSpinBox.value()) self.timeoutSpinBox.value())
# Reset screens after initial definition # Reset screens after initial definition
self.screens.override[u'size'] = QtCore.QRect( if self.overrideChanged:
int(self.customXValueEdit.text()), self.screens.override[u'size'] = QtCore.QRect(
int(self.customYValueEdit.text()), int(self.customXValueEdit.text()),
int(self.customWidthValueEdit.text()), int(self.customYValueEdit.text()),
int(self.customHeightValueEdit.text())) int(self.customWidthValueEdit.text()),
if self.overrideCheckBox.isChecked(): int(self.customHeightValueEdit.text()))
self.screens.set_override_display() if self.overrideCheckBox.isChecked():
Receiver.send_message(u'config_screen_changed') self.screens.set_override_display()
else: Receiver.send_message(u'config_screen_changed')
self.screens.reset_current_display() else:
self.screens.reset_current_display()
Receiver.send_message(u'config_screen_changed')
def onOverrideCheckBoxToggled(self, checked): def onOverrideCheckBoxToggled(self, checked):
""" """