mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 03:43:12 +08:00
Use a preference for the autosave delay and reduce it to 10 seconds
It only triggers after we have stopped changing things, so having a shorter delay is not that dangerous. Using preference as per @ghostkeeper 's suggestion. Contributes to CURA-511
This commit is contained in:
parent
3369750b97
commit
15aec5914a
@ -26,8 +26,10 @@ class AutoSave(Extension):
|
|||||||
Application
|
Application
|
||||||
self._onActiveProfileChanged()
|
self._onActiveProfileChanged()
|
||||||
|
|
||||||
|
Preferences.getInstance().addPreference("cura/autosave_delay", 1000 * 10)
|
||||||
|
|
||||||
self._change_timer = QTimer()
|
self._change_timer = QTimer()
|
||||||
self._change_timer.setInterval(1000 * 60)
|
self._change_timer.setInterval(Preferences.getInstance().getValue("cura/autosave_delay"))
|
||||||
self._change_timer.setSingleShot(True)
|
self._change_timer.setSingleShot(True)
|
||||||
self._change_timer.timeout.connect(self._onTimeout)
|
self._change_timer.timeout.connect(self._onTimeout)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user