Browse Source

pid tuning: add mouse wheel zooming

QGC4.4
Beat Küng 4 years ago committed by Lorenz Meier
parent
commit
4adc57a518
  1. 7
      src/QmlControls/PIDTuning.qml

7
src/QmlControls/PIDTuning.qml

@ -254,6 +254,13 @@ RowLayout {
var next = chart.mapToValue(Qt.point(mouse.x+1, mouse.y+1)) var next = chart.mapToValue(Qt.point(mouse.x+1, mouse.y+1))
_scaling = next.x - start.x _scaling = next.x - start.x
} }
onWheel: {
if (wheel.angleDelta.y > 0)
chartDisplaySec /= 1.2
else
chartDisplaySec *= 1.2
_xAxis.min = _xAxis.max - chartDisplaySec
}
onPositionChanged: { onPositionChanged: {
if(_startPoint != undefined) { if(_startPoint != undefined) {
dataTimer.running = false dataTimer.running = false

Loading…
Cancel
Save