diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index 56bc9e2fcc..55261480a0 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -11,6 +11,7 @@ from UM.Settings.ContainerRegistry import ContainerRegistry from cura.Settings.GlobalStack import GlobalStack from plugins.Marketplace.InstallMissingPackagesDialog import InstallMissingPackageDialog from .UpdatableMachinesModel import UpdatableMachinesModel +from UM.Message import Message import os import threading @@ -378,6 +379,16 @@ class WorkspaceDialog(QObject): time.sleep(1 / 50) QCoreApplication.processEvents() # Ensure that the GUI does not freeze. + @pyqtSlot() + def showMissingMaterialsWarning(self) -> None: + result_message = Message( + i18n_catalog.i18nc("@info:status", "The material used in this project relies on some material definitions not available in Cura, this might produce undesirable print results. We highly recommend installing the full material package from the Marketplace."), + lifetime=0, + title=i18n_catalog.i18nc("@info:title", "Material profiles not installed"), + message_type=Message.MessageType.WARNING + ) + result_message.show() + def __show(self) -> None: if self._view is None: self._createViewFromQML() diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index f6048f8324..de0f5c8acd 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -463,7 +463,10 @@ UM.Dialog { visible: buttonWarning text: catalog.i18nc("@action:button", "Open project anyway") - onClicked: reject() + onClicked: { + manager.showMissingMaterialsWarning(); + accept(); + } }, Cura.PrimaryButton {