From 1b1ca8a53bdacb7db03bcf2d2508de63b2aa6929 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Tue, 18 Sep 2018 14:39:43 +0200 Subject: [PATCH] Fix, simulation did not play after second layer CURA-5725 --- plugins/SimulationView/LayerSlider.qml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/plugins/SimulationView/LayerSlider.qml b/plugins/SimulationView/LayerSlider.qml index 5bce35c077..ce0810b21f 100644 --- a/plugins/SimulationView/LayerSlider.qml +++ b/plugins/SimulationView/LayerSlider.qml @@ -193,10 +193,14 @@ Item { return result } + function setValueAndStopSimulation(value) + { + sliderRoot.manuallyChanged = true + upperHandle.setValue(value) + } + // set the slider position based on the upper value function setValue(value) { - sliderRoot.manuallyChanged = true - // Normalize values between range, since using arrow keys will create out-of-the-range values value = sliderRoot.normalizeValue(value) @@ -252,7 +256,7 @@ Item { maximumValue: sliderRoot.maximumValue value: sliderRoot.upperValue busy: UM.SimulationView.busy - setValue: upperHandle.setValue // connect callback functions + setValue: upperHandle.setValueAndStopSimulation // connect callback functions } } @@ -292,9 +296,14 @@ Item { return result } + function setValueAndStopSimulation(value) + { + sliderRoot.manuallyChanged = true + lowerHandle.setValue(value) + } + // set the slider position based on the lower value function setValue(value) { - sliderRoot.manuallyChanged = true // Normalize values between range, since using arrow keys will create out-of-the-range values value = sliderRoot.normalizeValue(value) @@ -343,7 +352,7 @@ Item { maximumValue: sliderRoot.maximumValue value: sliderRoot.lowerValue busy: UM.SimulationView.busy - setValue: lowerHandle.setValue // connect callback functions + setValue: lowerHandle.setValueAndStopSimulation // connect callback functions } } } \ No newline at end of file