diff --git a/CHANGELOG.md b/CHANGELOG.md index 3226684..c1b9093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog of Cura-DuetRRFPlugin -## v1.2.1: next +## v1.2.1: 2021-01-21 * fix button width on high-dpi screens + * fix race condition when checking for unmapped settings ## v1.2.0: 2021-01-10 * store settings in local preferences instead of sharable metadata diff --git a/DuetRRFPlugin.py b/DuetRRFPlugin.py index f254980..5f5eb54 100644 --- a/DuetRRFPlugin.py +++ b/DuetRRFPlugin.py @@ -22,6 +22,7 @@ def __init__(self): super().__init__() self._application = CuraApplication.getInstance() self._application.globalContainerStackChanged.connect(self._checkDuetRRFOutputDevices) + self._application.initializationFinished.connect(self._delay_check_unmapped_settings) init_settings() @@ -29,19 +30,21 @@ def __init__(self): self._found_unmapped = {} - self._change_timer = QTimer() - self._change_timer.setInterval(2000) - self._change_timer.setSingleShot(True) - self._change_timer.timeout.connect(self._check_unmapped_settings) - self._change_timer.start() - def start(self): pass def stop(self, store_data: bool = True): pass + def _delay_check_unmapped_settings(self): + self._change_timer = QTimer() + self._change_timer.setInterval(10000) + self._change_timer.setSingleShot(True) + self._change_timer.timeout.connect(self._check_unmapped_settings) + self._change_timer.start() + def _check_unmapped_settings(self): + Logger.log("d", "called") try: instances = json.loads(self._application.getPreferences().getValue(DUETRRF_SETTINGS))