diff --git a/src/QmlControls/QGCCanvas.qml b/src/QmlControls/QGCCanvas.qml new file mode 100644 index 0000000000000000000000000000000000000000..1b7d6e3b9808e49e9ce3c3e351bb201ac3393e9d --- /dev/null +++ b/src/QmlControls/QGCCanvas.qml @@ -0,0 +1,17 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 + +import QGroundControl.Palette 1.0 +import QGroundControl.ScreenTools 1.0 + +/// Canvas has some sort of bug in it which can cause it to not paint when top level Views +/// are switched. In order to fix this we ahve a signal hacked into ScreenTools to force +/// a repaint. +Canvas { + Connections { + target: ScreenTools + + onRepaintRequested: arrowCanvas.requestPaint() + } +} diff --git a/src/QmlControls/QGroundControl.Controls.qmldir b/src/QmlControls/QGroundControl.Controls.qmldir index cc9b94af863eb80dbf383a5ef39b88434e96cf10..5d72b54cccfab741ef85519db4002ba3a19598ce 100644 --- a/src/QmlControls/QGroundControl.Controls.qmldir +++ b/src/QmlControls/QGroundControl.Controls.qmldir @@ -9,6 +9,7 @@ QGCComboBox 1.0 QGCComboBox.qml QGCColoredImage 1.0 QGCColoredImage.qml QGCToolBarButton 1.0 QGCToolBarButton.qml QGCMovableItem 1.0 QGCMovableItem.qml +QGCCanvas 1.0 QGCCanvas.qml SubMenuButton 1.0 SubMenuButton.qml IndicatorButton 1.0 IndicatorButton.qml