mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Always clear ListModel so layer height selector will align properly
CURA-6836
This commit is contained in:
parent
c030328b7f
commit
296f8af59c
1 changed files with 7 additions and 0 deletions
|
@ -63,6 +63,13 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
|||
def _update(self):
|
||||
Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__))
|
||||
|
||||
# CURA-6836
|
||||
# LabelBar is a repeater that creates labels for quality layer heights. Because of an optimization in
|
||||
# UM.ListModel, the model will not remove all items and recreate new ones every time there's an update.
|
||||
# Because LabelBar uses Repeater with Labels anchoring to "undefined" in certain cases, the anchoring will be
|
||||
# kept the same as before.
|
||||
self.setItems([])
|
||||
|
||||
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_stack is None:
|
||||
self.setItems([])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue