changes made regards to PR review

CURA-11851
This commit is contained in:
Saumya Jain 2024-04-22 14:45:40 +02:00
parent a73dc80847
commit 6542d9ff13
2 changed files with 17 additions and 6 deletions

View file

@ -847,18 +847,18 @@ class MachineManager(QObject):
return result return result
@pyqtProperty(bool, notify = activeMaterialChanged) @pyqtProperty(bool, notify = currentConfigurationChanged)
def variantCoreUsableForFactor4(self) -> bool: def variantCoreUsableForFactor4(self) -> bool:
"""The selected core is usable if it is in second extruder of Factor4 """The selected core is usable if it is in second extruder of Factor4
""" """
result = True result = True
if not self._global_container_stack: if not self._global_container_stack:
return result return result
if self.activeMachine.id != "UltiMaker Factor 4": if not self.activeMachine.id.startswith("UltiMaker Factor 4"):
return result return result
for extruder_container in self._global_container_stack.extruderList: for extruder_container in self._global_container_stack.extruderList:
if( extruder_container.id.startswith("ultimaker_factor4_extruder_right")): if extruder_container.definition.id.startswith("ultimaker_factor4_extruder_right"):
if extruder_container.material == empty_material_container: if extruder_container.material == empty_material_container:
return True return True
if extruder_container.variant.id.startswith("ultimaker_factor4_bb"): if extruder_container.variant.id.startswith("ultimaker_factor4_bb"):

View file

@ -336,7 +336,7 @@ Item
source: UM.Theme.getIcon("Warning") source: UM.Theme.getIcon("Warning")
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: warnings.coreCompatibilityWarning? UM.Theme.getColor("core_compatibility_warning"): UM.Theme.getColor("material_compatibility_warning") color: UM.Theme.getColor("material_compatibility_warning")
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning || warnings.coreCompatibilityWarning visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning || warnings.coreCompatibilityWarning
} }
@ -346,8 +346,19 @@ Item
anchors.left: warningImage.right anchors.left: warningImage.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width
text:warnings.coreCompatibilityWarning? catalog.i18nc("@label", "Combination not recommended. Load BB core to slot 1 (left) for better reliability."): catalog.i18nc("@label", "Use glue for better adhesion with this material combination.") text: catalog.i18nc("@label", "Use glue for better adhesion with this material combination.")
visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning|| warnings.coreCompatibilityWarning visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
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 wrapMode: Text.WordWrap
} }
} }