mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-25 00:48:34 -07:00
Show warning only for enabled extruders
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
Updated warning icon visibility logic to display warnings only for enabled extruders in the simulation view menu. This prevents warnings from appearing for extruders that are not active.
This commit is contained in:
parent
9ff519fe19
commit
89a6708f19
1 changed files with 6 additions and 5 deletions
|
|
@ -76,10 +76,11 @@ Cura.ExpandableComponent
|
|||
source: UM.Theme.getIcon("Warning")
|
||||
color: UM.Theme.getColor("warning")
|
||||
visible: {
|
||||
// Check if any extruder is unchecked, but only for extruders that exist in the current printer
|
||||
var extruderCount = CuraApplication.getExtrudersModel().count;
|
||||
for (var i = 0; i < extruderCount; i++) {
|
||||
if (viewSettings.extruder_opacities[i] <= 0.5 && viewSettings.extruder_opacities[i] !== undefined && viewSettings.extruder_opacities[i] !== "") {
|
||||
// Check if any enabled extruder is unchecked
|
||||
var extrudersModel = CuraApplication.getExtrudersModel();
|
||||
for (var i = 0; i < extrudersModel.count; i++) {
|
||||
var extruder = extrudersModel.getItem(i);
|
||||
if (extruder.enabled && viewSettings.extruder_opacities[i] <= 0.5 && viewSettings.extruder_opacities[i] !== undefined && viewSettings.extruder_opacities[i] !== "") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -253,7 +254,7 @@ Cura.ExpandableComponent
|
|||
height: UM.Theme.getSize("section_icon").height
|
||||
source: UM.Theme.getIcon("Warning")
|
||||
color: UM.Theme.getColor("warning")
|
||||
visible: !extrudersModelCheckBox.checked
|
||||
visible: model.enabled && !extrudersModelCheckBox.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue