mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-29 17:45:45 +08:00
Merge pull request #18933 from Ultimaker/CURA-11851-warning-message-for-extruder2
Cura 11851 warning message for extruder2
This commit is contained in:
commit
112003db03
@ -847,6 +847,24 @@ class MachineManager(QObject):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify = currentConfigurationChanged)
|
||||||
|
def variantCoreUsableForFactor4(self) -> bool:
|
||||||
|
"""The selected core is usable if it is in second extruder of Factor4
|
||||||
|
"""
|
||||||
|
result = True
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return result
|
||||||
|
if self.activeMachine.definition.id != "ultimaker_factor4":
|
||||||
|
return result
|
||||||
|
|
||||||
|
for extruder_container in self._global_container_stack.extruderList:
|
||||||
|
if extruder_container.definition.id.startswith("ultimaker_factor4_extruder_right"):
|
||||||
|
if extruder_container.material == empty_material_container:
|
||||||
|
return True
|
||||||
|
if extruder_container.variant.id.startswith("ultimaker_factor4_bb"):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
@pyqtSlot(str, result = str)
|
@pyqtSlot(str, result = str)
|
||||||
def getDefinitionByMachineId(self, machine_id: str) -> Optional[str]:
|
def getDefinitionByMachineId(self, machine_id: str) -> Optional[str]:
|
||||||
"""Get the Definition ID of a machine (specified by ID)
|
"""Get the Definition ID of a machine (specified by ID)
|
||||||
|
@ -311,10 +311,11 @@ Item
|
|||||||
{
|
{
|
||||||
id: warnings
|
id: warnings
|
||||||
height: visible ? childrenRect.height : 0
|
height: visible ? childrenRect.height : 0
|
||||||
visible: buildplateCompatibilityError || buildplateCompatibilityWarning
|
visible: buildplateCompatibilityError || buildplateCompatibilityWarning || coreCompatibilityWarning
|
||||||
|
|
||||||
property bool buildplateCompatibilityError: !Cura.MachineManager.variantBuildplateCompatible && !Cura.MachineManager.variantBuildplateUsable
|
property bool buildplateCompatibilityError: !Cura.MachineManager.variantBuildplateCompatible && !Cura.MachineManager.variantBuildplateUsable
|
||||||
property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable
|
property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable
|
||||||
|
property bool coreCompatibilityWarning: !Cura.MachineManager.variantCoreUsableForFactor4
|
||||||
|
|
||||||
// This is a space holder aligning the warning messages.
|
// This is a space holder aligning the warning messages.
|
||||||
UM.Label
|
UM.Label
|
||||||
@ -336,7 +337,7 @@ Item
|
|||||||
width: UM.Theme.getSize("section_icon").width
|
width: UM.Theme.getSize("section_icon").width
|
||||||
height: UM.Theme.getSize("section_icon").height
|
height: UM.Theme.getSize("section_icon").height
|
||||||
color: UM.Theme.getColor("material_compatibility_warning")
|
color: UM.Theme.getColor("material_compatibility_warning")
|
||||||
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
|
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning || warnings.coreCompatibilityWarning
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
@ -349,6 +350,17 @@ Item
|
|||||||
visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
|
visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UM.Label
|
||||||
|
{
|
||||||
|
id: coreCompatibilityLabel
|
||||||
|
anchors.left: warningImage.right
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width
|
||||||
|
text: catalog.i18nc("@label", "Combination not recommended. Load BB core to slot 1 (left) for better reliability.")
|
||||||
|
visible: warnings.coreCompatibilityWarning
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,6 +179,8 @@
|
|||||||
|
|
||||||
"material_compatibility_warning": [255, 255, 255, 255],
|
"material_compatibility_warning": [255, 255, 255, 255],
|
||||||
|
|
||||||
|
"core_compatibility_warning": [255, 255, 255, 255],
|
||||||
|
|
||||||
"quality_slider_available": [255, 255, 255, 255],
|
"quality_slider_available": [255, 255, 255, 255],
|
||||||
|
|
||||||
"monitor_printer_family_tag": [86, 86, 106, 255],
|
"monitor_printer_family_tag": [86, 86, 106, 255],
|
||||||
|
@ -349,6 +349,7 @@
|
|||||||
"setting_validation_ok": "background_2",
|
"setting_validation_ok": "background_2",
|
||||||
|
|
||||||
"material_compatibility_warning": [243, 166, 59, 255],
|
"material_compatibility_warning": [243, 166, 59, 255],
|
||||||
|
"core_compatibility_warning": [243, 166, 59, 255],
|
||||||
|
|
||||||
"progressbar_background": [245, 245, 245, 255],
|
"progressbar_background": [245, 245, 245, 255],
|
||||||
"progressbar_control": [50, 130, 255, 255],
|
"progressbar_control": [50, 130, 255, 255],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user