Skip to content

Commit

Permalink
Add setValue support
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Jan 5, 2025
1 parent 30164fe commit c812165
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/QmlControls/ValueSlider.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ Control {

property var qgcPal: QGroundControl.globalPalette

function setValue(value) {
value = _clampedSliderValue(value)
if (value !== control.value) {
control.value = value
_recalcSliderPos(false)
}
}

Component.onCompleted: {
_recalcSliderPos(false)
_loadComplete = true
Expand Down

0 comments on commit c812165

Please sign in to comment.