mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
Show the message only if there are printers that support material export
If none of the user's printers support exporting materials to it, then the message should not be shown. CURA-8254
This commit is contained in:
parent
658e54c8e5
commit
8157cedfef
@ -73,7 +73,10 @@ class MaterialManagementModel(QObject):
|
||||
button_style = Message.ActionButtonStyle.LINK
|
||||
)
|
||||
sync_materials_message.actionTriggered.connect(self._onSyncMaterialsMessageActionTriggered)
|
||||
sync_materials_message.show()
|
||||
container_registry = cura.CuraApplication.CuraApplication.getInstance().getContainerRegistry()
|
||||
global_stacks = container_registry.findContainerStacks(type = "machine")
|
||||
if any([stack.supportsMaterialExport for stack in global_stacks]):
|
||||
sync_materials_message.show()
|
||||
|
||||
def _onSyncMaterialsMessageActionTriggered(self, sync_message: Optional[Message], sync_message_action: Optional[str]):
|
||||
if sync_message_action == "sync":
|
||||
|
Loading…
x
Reference in New Issue
Block a user