mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00
Use properties instead of slots for min & max flow
This fixes some update issues in the simulation view display CURA-8196
This commit is contained in:
parent
5d3b442efb
commit
5bfb0fc437
@ -412,7 +412,7 @@ Cura.ExpandableComponent
|
|||||||
// Flow Rate selected
|
// Flow Rate selected
|
||||||
if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
|
if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
|
||||||
{
|
{
|
||||||
return parseFloat(UM.SimulationView.getMinFlowRate()).toFixed(2);
|
return parseFloat(UM.SimulationView.minFlowRate).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -482,7 +482,7 @@ Cura.ExpandableComponent
|
|||||||
// Flow rate selected
|
// Flow rate selected
|
||||||
if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
|
if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
|
||||||
{
|
{
|
||||||
return parseFloat(UM.SimulationView.getMaxFlowRate()).toFixed(2);
|
return parseFloat(UM.SimulationView.maxFlowRate).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return catalog.i18nc("@label","max")
|
return catalog.i18nc("@label","max")
|
||||||
|
@ -126,15 +126,14 @@ class SimulationViewProxy(QObject):
|
|||||||
def minLineWidth(self):
|
def minLineWidth(self):
|
||||||
return self._simulation_view.getMinLineWidth()
|
return self._simulation_view.getMinLineWidth()
|
||||||
|
|
||||||
@pyqtSlot(result=float)
|
@pyqtProperty(float, notify=colorSchemeLimitsChanged)
|
||||||
def getMaxFlowRate(self):
|
def maxFlowRate(self):
|
||||||
return self._simulation_view.getMaxFlowRate()
|
return self._simulation_view.getMaxFlowRate()
|
||||||
|
|
||||||
@pyqtSlot(result=float)
|
@pyqtProperty(float, notify=colorSchemeLimitsChanged)
|
||||||
def getMinFlowRate(self):
|
def minFlowRate(self):
|
||||||
return self._simulation_view.getMinFlowRate()
|
return self._simulation_view.getMinFlowRate()
|
||||||
|
|
||||||
|
|
||||||
# Opacity 0..1
|
# Opacity 0..1
|
||||||
@pyqtSlot(int, float)
|
@pyqtSlot(int, float)
|
||||||
def setExtruderOpacity(self, extruder_nr, opacity):
|
def setExtruderOpacity(self, extruder_nr, opacity):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user