Fix logic that checks if auto-start timer setting is enabled, so that it checks real settings and not widget instantiation. Ensure the auto-start and auto-stop widgets show their datetime widget on start-up if the setting was already enabled.

This commit is contained in:
Miguel Jacq 2020-04-06 15:29:33 +10:00
parent 1c424500f0
commit a7856d5dcb
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
4 changed files with 15 additions and 21 deletions

View file

@ -269,7 +269,7 @@ class ServerStatus(QtWidgets.QWidget):
self.common.gui.css["server_status_button_working"]
)
self.server_button.setEnabled(True)
if self.autostart_timer_datetime:
if self.settings.get("general", "autostart_timer"):
self.server_button.setToolTip(
strings._("gui_start_server_autostart_timer_tooltip").format(
self.mode_settings_widget.autostart_timer_widget.dateTime().toString(
@ -279,15 +279,6 @@ class ServerStatus(QtWidgets.QWidget):
)
else:
self.server_button.setText(strings._("gui_please_wait"))
if self.settings.get("general", "autostart_timer"):
self.server_button.setToolTip(
strings._("gui_start_server_autostart_timer_tooltip").format(
self.mode_settings_widget.autostart_timer_widget.dateTime().toString(
"h:mm AP, MMMM dd, yyyy"
)
)
)
else:
self.server_button.setStyleSheet(
self.common.gui.css["server_status_button_working"]