Actually still uncheck the timer when the server stops, but *only* when it stops

This commit is contained in:
Miguel Jacq 2017-12-06 10:21:39 +11:00
parent bddb9596d1
commit d500069398
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
2 changed files with 2 additions and 3 deletions

View file

@ -119,6 +119,7 @@ class ServerStatus(QtWidgets.QVBoxLayout):
"""
Reset the timeout in the UI after stopping a share
"""
self.server_shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Unchecked)
self.server_shutdown_timeout.setDateTime(QtCore.QDateTime.currentDateTime().addSecs(300))
self.server_shutdown_timeout.setMinimumDateTime(QtCore.QDateTime.currentDateTime().addSecs(120))
@ -196,7 +197,6 @@ class ServerStatus(QtWidgets.QVBoxLayout):
self.start_server()
elif self.status == self.STATUS_STARTED:
self.stop_server()
self.shutdown_timeout_reset()
def start_server(self):
"""
@ -219,6 +219,7 @@ class ServerStatus(QtWidgets.QVBoxLayout):
Stop the server.
"""
self.status = self.STATUS_WORKING
self.shutdown_timeout_reset()
self.update()
self.server_stopped.emit()