Commit d8bd816b authored by Gus Grubba's avatar Gus Grubba

Compute plan view items visibility on the fly.

parent 10215bbd
......@@ -53,6 +53,7 @@ QGCView {
property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1
property real _toolbarHeight: _qgcView.height - ScreenTools.availableHeight
property int _editingLayer: _layerMission
property int _toolStripBottom: toolStrip.height + toolStrip.y
readonly property int _layerMission: 1
readonly property int _layerGeoFence: 2
......@@ -646,7 +647,7 @@ QGCView {
anchors.bottom: waypointValuesDisplay.visible ? waypointValuesDisplay.top : parent.bottom
anchors.left: parent.left
mapControl: editorMap
visible: !ScreenTools.isTinyScreen
visible: _toolStripBottom < y
}
MissionItemStatus {
......@@ -657,7 +658,7 @@ QGCView {
maxWidth: parent.width - rightPanel.width - x
anchors.bottom: parent.bottom
missionItems: _missionController.visualItems
visible: _editingLayer === _layerMission && (ScreenTools.isMobile ? height < Screen.height * 0.25 : true)
visible: _editingLayer === _layerMission && (_toolStripBottom + mapScale.height) < y && QGroundControl.corePlugin.options.showMissionStatus
}
} // QGCViewPanel
......
......@@ -45,6 +45,7 @@ public:
Q_PROPERTY(bool showOfflineMapExport READ showOfflineMapExport NOTIFY showOfflineMapExportChanged)
Q_PROPERTY(bool showOfflineMapImport READ showOfflineMapImport NOTIFY showOfflineMapImportChanged)
Q_PROPERTY(bool useMobileFileDialog READ useMobileFileDialog CONSTANT)
Q_PROPERTY(bool showMissionStatus READ showMissionStatus CONSTANT)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
......@@ -62,6 +63,10 @@ public:
/// @return An alternate widget (see QGCInstrumentWidget.qml, the default widget)
virtual CustomInstrumentWidget* instrumentWidget();
/// Should the mission status indicator (Plan View) be shown?
/// @return Yes or no
virtual bool showMissionStatus () { return true; }
/// Allows access to the full fly view window
virtual QUrl flyViewOverlay () const { return QUrl(); }
/// By returning false you can hide the following sensor calibration pages
......
......@@ -135,6 +135,7 @@ MainWindow::MainWindow()
_ui.setupUi(this);
// Make sure tool bar elements all fit before changing minimum width
setMinimumWidth(1008);
setMinimumHeight(520);
configureWindowName();
// Setup central widget with a layout to hold the views
......
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