Commit df2aa913 authored by Gus Grubba's avatar Gus Grubba

Adjust plan view to use full (available) height

parent b96b752e
...@@ -53,7 +53,6 @@ Item { ...@@ -53,7 +53,6 @@ Item {
property bool _addWaypointOnClick: false property bool _addWaypointOnClick: false
property bool _addROIOnClick: false property bool _addROIOnClick: false
property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1 property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1
property real _toolbarHeight: _root.height - mainWindow.height
property int _editingLayer: _layerMission property int _editingLayer: _layerMission
property int _toolStripBottom: toolStrip.height + toolStrip.y property int _toolStripBottom: toolStrip.height + toolStrip.y
property var _appSettings: QGroundControl.settingsManager.appSettings property var _appSettings: QGroundControl.settingsManager.appSettings
...@@ -418,7 +417,7 @@ Item { ...@@ -418,7 +417,7 @@ Item {
planView: true planView: true
// This is the center rectangle of the map which is not obscured by tools // This is the center rectangle of the map which is not obscured by tools
property rect centerViewport: Qt.rect(_leftToolWidth, _toolbarHeight, editorMap.width - _leftToolWidth - _rightPanelWidth, editorMap.height - _statusHeight - _toolbarHeight) property rect centerViewport: Qt.rect(_leftToolWidth, 0, editorMap.width - _leftToolWidth - _rightPanelWidth, editorMap.height - _statusHeight)
property real _leftToolWidth: toolStrip.x + toolStrip.width property real _leftToolWidth: toolStrip.x + toolStrip.width
property real _statusHeight: waypointValuesDisplay.visible ? editorMap.height - waypointValuesDisplay.y : 0 property real _statusHeight: waypointValuesDisplay.visible ? editorMap.height - waypointValuesDisplay.y : 0
...@@ -447,13 +446,6 @@ Item { ...@@ -447,13 +446,6 @@ Item {
onClicked: { onClicked: {
// Take focus to close any previous editing // Take focus to close any previous editing
editorMap.focus = true editorMap.focus = true
//-- Don't pay attention to items beneath the toolbar.
var topLimit = parent.height - mainWindow.height
if(mouse.y < topLimit) {
return
}
var coordinate = editorMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) var coordinate = editorMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces) coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces)
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces) coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
...@@ -627,7 +619,7 @@ Item { ...@@ -627,7 +619,7 @@ Item {
// Right pane for mission editing controls // Right pane for mission editing controls
Rectangle { Rectangle {
id: rightPanel id: rightPanel
height: mainWindow.height height: parent.height
width: _rightPanelWidth width: _rightPanelWidth
color: qgcPal.window color: qgcPal.window
opacity: planExpanded.visible ? 0.2 : 0 opacity: planExpanded.visible ? 0.2 : 0
......
...@@ -275,15 +275,6 @@ ApplicationWindow { ...@@ -275,15 +275,6 @@ ApplicationWindow {
} }
} }
//-------------------------------------------------------------------------
//-- Plan View
Loader {
id: planViewLoader
anchors.fill: parent
visible: false
source: "PlanView.qml"
}
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Toolbar //-- Toolbar
header: ToolBar { header: ToolBar {
...@@ -299,6 +290,15 @@ ApplicationWindow { ...@@ -299,6 +290,15 @@ ApplicationWindow {
} }
} }
//-------------------------------------------------------------------------
//-- Plan View
Loader {
id: planViewLoader
anchors.fill: parent
visible: false
source: "PlanView.qml"
}
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Current content //-- Current content
Loader { Loader {
......
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