mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -06:00
Only show restart dialog when packages were installed
CURA-6983
This commit is contained in:
parent
2da8040e5a
commit
6aba835c1c
1 changed files with 5 additions and 1 deletions
|
@ -73,6 +73,8 @@ class SyncOrchestrator(Extension):
|
||||||
def _onLicenseAnswers(self, answers: [Dict[str, Any]]):
|
def _onLicenseAnswers(self, answers: [Dict[str, Any]]):
|
||||||
Logger.debug("Got license answers: {}", answers)
|
Logger.debug("Got license answers: {}", answers)
|
||||||
|
|
||||||
|
has_changes = False # True when at least one package is installed
|
||||||
|
|
||||||
for item in answers:
|
for item in answers:
|
||||||
if item["accepted"]:
|
if item["accepted"]:
|
||||||
# install and subscribe packages
|
# install and subscribe packages
|
||||||
|
@ -80,13 +82,15 @@ class SyncOrchestrator(Extension):
|
||||||
Logger.error("could not install {}".format(item["package_id"]))
|
Logger.error("could not install {}".format(item["package_id"]))
|
||||||
continue
|
continue
|
||||||
self._cloud_package_manager.subscribe(item["package_id"])
|
self._cloud_package_manager.subscribe(item["package_id"])
|
||||||
|
has_changes = True
|
||||||
else:
|
else:
|
||||||
# todo unsubscribe declined packages
|
# todo unsubscribe declined packages
|
||||||
pass
|
pass
|
||||||
# delete temp file
|
# delete temp file
|
||||||
os.remove(item["package_path"])
|
os.remove(item["package_path"])
|
||||||
|
|
||||||
self._restart_presenter.present()
|
if has_changes:
|
||||||
|
self._restart_presenter.present()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue