mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Automatically stop simulation when the user manually changes the layer (as opposed to the sim. itself). [CURA-5677]
This commit is contained in:
parent
a7f421c60c
commit
c8eeb737bb
1 changed files with 17 additions and 3 deletions
|
@ -666,9 +666,21 @@ Item
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: UM.SimulationView
|
target: UM.SimulationView
|
||||||
onMaxLayersChanged: layerSlider.setUpperValue(UM.SimulationView.currentLayer)
|
onMaxLayersChanged:
|
||||||
onMinimumLayerChanged: layerSlider.setLowerValue(UM.SimulationView.minimumLayer)
|
{
|
||||||
onCurrentLayerChanged: layerSlider.setUpperValue(UM.SimulationView.currentLayer)
|
playButton.pauseSimulation()
|
||||||
|
layerSlider.setUpperValue(UM.SimulationView.currentLayer)
|
||||||
|
}
|
||||||
|
onMinimumLayerChanged:
|
||||||
|
{
|
||||||
|
playButton.pauseSimulation()
|
||||||
|
layerSlider.setLowerValue(UM.SimulationView.minimumLayer)
|
||||||
|
}
|
||||||
|
onCurrentLayerChanged:
|
||||||
|
{
|
||||||
|
playButton.pauseSimulation()
|
||||||
|
layerSlider.setUpperValue(UM.SimulationView.currentLayer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure the slider handlers show the correct value after switching views
|
// make sure the slider handlers show the correct value after switching views
|
||||||
|
@ -723,6 +735,7 @@ Item
|
||||||
UM.SimulationView.setSimulationRunning(true)
|
UM.SimulationView.setSimulationRunning(true)
|
||||||
iconSource = "./resources/simulation_pause.svg"
|
iconSource = "./resources/simulation_pause.svg"
|
||||||
simulationTimer.start()
|
simulationTimer.start()
|
||||||
|
status = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,6 +779,7 @@ Item
|
||||||
{
|
{
|
||||||
UM.SimulationView.setCurrentLayer(currentLayer+1)
|
UM.SimulationView.setCurrentLayer(currentLayer+1)
|
||||||
UM.SimulationView.setCurrentPath(0)
|
UM.SimulationView.setCurrentPath(0)
|
||||||
|
playButton.resumeSimulation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue