mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add a property that indicates when the layer slider or the path slider
has changed manually. With this we can differentiate when the layer changed automatically (during simulation) or manually (by user interaction). In case it was changed manually, the simulation will stop. Contributes to CURA-5725.
This commit is contained in:
parent
2bf617b53a
commit
dfae4a9a86
3 changed files with 55 additions and 16 deletions
|
@ -34,6 +34,7 @@ Item {
|
|||
property real handleValue: maximumValue
|
||||
|
||||
property bool pathsVisible: true
|
||||
property bool manuallyChanged: true // Indicates whether the value was changed manually or during simulation
|
||||
|
||||
function getHandleValueFromSliderHandle () {
|
||||
return handle.getValue()
|
||||
|
@ -97,6 +98,7 @@ Item {
|
|||
visible: sliderRoot.pathsVisible
|
||||
|
||||
function onHandleDragged () {
|
||||
sliderRoot.manuallyChanged = true
|
||||
|
||||
// update the range handle
|
||||
sliderRoot.updateRangeHandle()
|
||||
|
@ -128,8 +130,16 @@ Item {
|
|||
sliderRoot.updateRangeHandle()
|
||||
}
|
||||
|
||||
Keys.onRightPressed: handleLabel.setValue(handleLabel.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||
Keys.onLeftPressed: handleLabel.setValue(handleLabel.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||
Keys.onRightPressed:
|
||||
{
|
||||
sliderRoot.manuallyChanged = true
|
||||
handleLabel.setValue(handleLabel.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||
}
|
||||
Keys.onLeftPressed:
|
||||
{
|
||||
sliderRoot.manuallyChanged = true
|
||||
handleLabel.setValue(handleLabel.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||
}
|
||||
|
||||
// dragging
|
||||
MouseArea {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue