Commit e5dd4678 authored by Don Gagne's avatar Don Gagne

Fix binding output spam

parent c6701173
......@@ -17,10 +17,10 @@ import QGroundControl.Controls 1.0
/// Use to drag a MissionItemIndicator
Rectangle {
id: itemDragger
x: itemIndicator.x - _touchMarginHorizontal
y: itemIndicator.y - _touchMarginVertical
width: itemIndicator.width + (_touchMarginHorizontal * 2)
height: itemIndicator.height + (_touchMarginVertical * 2)
x: _itemIndicatorX - _touchMarginHorizontal
y: _itemIndicatorY - _touchMarginVertical
width: _itemIndicatorWidth + (_touchMarginHorizontal * 2)
height: _itemIndicatorHeight + (_touchMarginVertical * 2)
color: "transparent"
z: QGroundControl.zOrderMapItems + 1 // Above item icons
......@@ -34,11 +34,15 @@ Rectangle {
property bool _preventCoordinateBindingLoop: false
property real _itemIndicatorX: itemIndicator ? itemIndicator.x : 0
property real _itemIndicatorY: itemIndicator ? itemIndicator.y : 0
property real _itemIndicatorWidth: itemIndicator ? itemIndicator.width : 0
property real _itemIndicatorHeight: itemIndicator ? itemIndicator.height : 0
property bool _mobile: ScreenTools.isMobile
property real _touchWidth: Math.max(itemIndicator.width, ScreenTools.minTouchPixels)
property real _touchHeight: Math.max(itemIndicator.height, ScreenTools.minTouchPixels)
property real _touchMarginHorizontal: _mobile ? (_touchWidth - itemIndicator.width) / 2 : 0
property real _touchMarginVertical: _mobile ? (_touchHeight - itemIndicator.height) / 2 : 0
property real _touchWidth: Math.max(_itemIndicatorWidth, ScreenTools.minTouchPixels)
property real _touchHeight: Math.max(_itemIndicatorHeight, ScreenTools.minTouchPixels)
property real _touchMarginHorizontal: _mobile ? (_touchWidth - _itemIndicatorWidth) / 2 : 0
property real _touchMarginVertical: _mobile ? (_touchHeight - _itemIndicatorHeight) / 2 : 0
property bool _dragStartSignalled: false
onXChanged: liveDrag()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment