Update colour scheme limits if visibility changed the limits

If the user makes certain structures visible or invisible, and this then causes the limits of the colour scheme to change, this now triggers the layer view to be re-rendered and updates the legend in the simulation view menu component.
This commit is contained in:
Ghostkeeper 2021-04-03 16:49:04 +02:00
parent 424f037dca
commit 9f902f7a7a
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 39 additions and 19 deletions

View file

@ -389,17 +389,17 @@ Cura.ExpandableComponent
// Feedrate selected
if (UM.Preferences.getValue("layerview/layer_view_type") == 2)
{
return parseFloat(UM.SimulationView.getMinFeedrate()).toFixed(2)
return parseFloat(UM.SimulationView.minFeedrate).toFixed(2)
}
// Layer thickness selected
if (UM.Preferences.getValue("layerview/layer_view_type") == 3)
{
return parseFloat(UM.SimulationView.getMinThickness()).toFixed(2)
return parseFloat(UM.SimulationView.minThickness).toFixed(2)
}
//Line width selected
if(UM.Preferences.getValue("layerview/layer_view_type") == 4)
{
return parseFloat(UM.SimulationView.getMinLineWidth()).toFixed(2);
return parseFloat(UM.SimulationView.minLineWidth).toFixed(2);
}
}
return catalog.i18nc("@label","min")
@ -448,17 +448,17 @@ Cura.ExpandableComponent
// Feedrate selected
if (UM.Preferences.getValue("layerview/layer_view_type") == 2)
{
return parseFloat(UM.SimulationView.getMaxFeedrate()).toFixed(2)
return parseFloat(UM.SimulationView.maxFeedrate).toFixed(2)
}
// Layer thickness selected
if (UM.Preferences.getValue("layerview/layer_view_type") == 3)
{
return parseFloat(UM.SimulationView.getMaxThickness()).toFixed(2)
return parseFloat(UM.SimulationView.maxThickness).toFixed(2)
}
//Line width selected
if(UM.Preferences.getValue("layerview/layer_view_type") == 4)
{
return parseFloat(UM.SimulationView.getMaxLineWidth()).toFixed(2);
return parseFloat(UM.SimulationView.maxLineWidth).toFixed(2);
}
}
return catalog.i18nc("@label","max")