From ce34e16cdd731ff07c6362a084c0cf7f5b5acda5 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 4 Oct 2021 16:47:48 +0200 Subject: [PATCH] Add documentation CURA-8254 --- cura/Machines/Models/MaterialManagementModel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/MaterialManagementModel.py b/cura/Machines/Models/MaterialManagementModel.py index c174625bb7..8747e2279c 100644 --- a/cura/Machines/Models/MaterialManagementModel.py +++ b/cura/Machines/Models/MaterialManagementModel.py @@ -36,9 +36,12 @@ class MaterialManagementModel(QObject): self._checkIfNewMaterialsWereInstalled() def _checkIfNewMaterialsWereInstalled(self): + """ + Checks whether new material packages were installed in the latest startup. If there were, then it shows + a message prompting the user to sync the materials with their printers. + """ application = cura.CuraApplication.CuraApplication.getInstance() new_materials_installed = False - print(application.getPackageManager().installed_packages) for package_id, package_info in application.getPackageManager().installed_packages.items(): new_materials_installed = package_info["package_info"]["package_type"] == "material" if new_materials_installed: @@ -57,6 +60,7 @@ class MaterialManagementModel(QObject): "sync", name = catalog.i18nc("@action:button", "Sync materials with printers"), icon = "", + description = "Sync your newly installed materials with your printers.", button_align = Message.ActionButtonAlignment.ALIGN_RIGHT ) @@ -64,6 +68,7 @@ class MaterialManagementModel(QObject): "learn_more", name = catalog.i18nc("@action:button", "Learn more"), icon = "", + description = "Learn more about syncing your newly installed materials with your printers.", button_align = Message.ActionButtonAlignment.ALIGN_LEFT, button_style = Message.ActionButtonStyle.LINK )