Browse Source

Merge pull request #4925 from DonLakeFlyer/Bugs

Bugs
QGC4.4
Don Gagne 8 years ago committed by GitHub
parent
commit
23ad3af011
  1. 13
      src/FlightDisplay/FlightDisplayViewMap.qml
  2. 2
      src/FlightMap/MapItems/MissionLineView.qml
  3. 19
      src/PlanView/MissionItemEditor.qml
  4. 12
      src/PlanView/SectionHeader.qml
  5. 5
      src/QmlControls/QGCComboBox.qml
  6. 10
      src/QmlControls/QGroundControlQmlGlobal.h
  7. 8
      src/QmlControls/ToolStrip.qml
  8. 22
      src/QtLocationPlugin/QMLControl/OfflineMap.qml

13
src/FlightDisplay/FlightDisplayViewMap.qml

@ -46,7 +46,6 @@ FlightMap { @@ -46,7 +46,6 @@ FlightMap {
property bool _disableVehicleTracking: false
property bool _keepVehicleCentered: _mainIsMap ? false : true
// Track last known map position and zoom from Fly view in settings
onZoomLevelChanged: QGroundControl.flightMapZoom = zoomLevel
onCenterChanged: QGroundControl.flightMapPosition = center
@ -209,11 +208,11 @@ FlightMap { @@ -209,11 +208,11 @@ FlightMap {
// Add trajectory points to the map
MapItemView {
model: _mainIsMap ? _activeVehicle ? _activeVehicle.trajectoryPoints : 0 : 0
delegate:
MapPolyline {
delegate: MapPolyline {
line.width: 3
line.color: "red"
z: QGroundControl.zOrderMapItems - 2
z: QGroundControl.zOrderTrajectoryLines
path: [
object.coordinate1,
object.coordinate2,
@ -224,13 +223,13 @@ FlightMap { @@ -224,13 +223,13 @@ FlightMap {
// Add the vehicles to the map
MapItemView {
model: QGroundControl.multiVehicleManager.vehicles
delegate:
VehicleMapItem {
delegate: VehicleMapItem {
vehicle: object
coordinate: object.coordinate
isSatellite: flightMap.isSatelliteMap
size: _mainIsMap ? ScreenTools.defaultFontPixelHeight * 3 : ScreenTools.defaultFontPixelHeight
z: QGroundControl.zOrderMapItems - 1
z: QGroundControl.zOrderVehicles
}
}

2
src/FlightMap/MapItems/MissionLineView.qml

@ -24,7 +24,7 @@ MapItemView { @@ -24,7 +24,7 @@ MapItemView {
delegate: MapPolyline {
line.width: 3
line.color: "#be781c" // Hack, can't get palette to work in here
z: QGroundControl.zOrderMapItems - 1 // Under item indicators
z: QGroundControl.zOrderWaypointLines
path: [
object.coordinate1,

19
src/PlanView/MissionItemEditor.qml

@ -45,9 +45,17 @@ Rectangle { @@ -45,9 +45,17 @@ Rectangle {
colorGroupEnabled: enabled
}
FocusScope {
id: currentItemScope
anchors.fill: parent
MouseArea {
anchors.fill: parent
onClicked: _root.clicked()
onClicked: {
currentItemScope.focus = true
_root.clicked()
}
}
}
QGCLabel {
@ -76,7 +84,14 @@ Rectangle { @@ -76,7 +84,14 @@ Rectangle {
QGCMouseArea {
fillItem: hamburger
visible: hamburger.visible
onClicked: _waypointsOnlyMode ? waypointsOnlyMenu.popup() : normalMenu.popup()
onClicked: {
currentItemScope.focus = true
if (_waypointsOnlyMode) {
waypointsOnlyMenu.popup()
} else {
normalMenu.popup()
}
}
Menu {
id: normalMenu

12
src/PlanView/SectionHeader.qml

@ -6,12 +6,11 @@ import QtGraphicalEffects 1.0 @@ -6,12 +6,11 @@ import QtGraphicalEffects 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
QGCMouseArea {
FocusScope {
id: _root
anchors.left: parent.left
anchors.right: parent.right
height: column.height
onClicked: checked = !checked
property alias text: label.text
property bool checked: true
@ -27,6 +26,14 @@ QGCMouseArea { @@ -27,6 +26,14 @@ QGCMouseArea {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
QGCMouseArea {
anchors.fill: parent
onClicked: {
_root.focus = true
checked = !checked
}
ColumnLayout {
id: column
anchors.left: parent.left
@ -62,3 +69,4 @@ QGCMouseArea { @@ -62,3 +69,4 @@ QGCMouseArea {
}
}
}
}

5
src/QmlControls/QGCComboBox.qml

@ -68,7 +68,10 @@ Button { @@ -68,7 +68,10 @@ Button {
}
}
onClicked: popup.toggleShow()
onClicked: {
combo.focus = true
popup.toggleShow()
}
Component.onCompleted: {
if (currentIndex === -1) {

10
src/QmlControls/QGroundControlQmlGlobal.h

@ -53,7 +53,11 @@ public: @@ -53,7 +53,11 @@ public:
Q_PROPERTY(qreal zOrderTopMost READ zOrderTopMost CONSTANT) ///< z order for top most items, toolbar, main window sub view
Q_PROPERTY(qreal zOrderWidgets READ zOrderWidgets CONSTANT) ///< z order value to widgets, for example: zoom controls, hud widgetss
Q_PROPERTY(qreal zOrderMapItems READ zOrderMapItems CONSTANT) ///< z order value for map items, for example: mission item indicators
Q_PROPERTY(qreal zOrderMapItems READ zOrderMapItems CONSTANT)
Q_PROPERTY(qreal zOrderVehicles READ zOrderVehicles CONSTANT)
Q_PROPERTY(qreal zOrderWaypointIndicators READ zOrderWaypointIndicators CONSTANT)
Q_PROPERTY(qreal zOrderTrajectoryLines READ zOrderTrajectoryLines CONSTANT)
Q_PROPERTY(qreal zOrderWaypointLines READ zOrderWaypointLines CONSTANT)
//-------------------------------------------------------------------------
// MavLink Protocol
@ -138,6 +142,10 @@ public: @@ -138,6 +142,10 @@ public:
qreal zOrderTopMost () { return 1000; }
qreal zOrderWidgets () { return 100; }
qreal zOrderMapItems () { return 50; }
qreal zOrderWaypointIndicators () { return 50; }
qreal zOrderVehicles () { return 49; }
qreal zOrderTrajectoryLines () { return 48; }
qreal zOrderWaypointLines () { return 47; }
bool isVersionCheckEnabled () { return _toolbox->mavlinkProtocol()->versionCheckEnabled(); }
int mavlinkSystemID () { return _toolbox->mavlinkProtocol()->getSystemId(); }

8
src/QmlControls/ToolStrip.qml

@ -163,10 +163,14 @@ Rectangle { @@ -163,10 +163,14 @@ Rectangle {
visible: index == 0 ? _showOptionalElements : true
}
Rectangle {
FocusScope {
id: scope
anchors.left: parent.left
anchors.right: parent.right
height: width
Rectangle {
anchors.fill: parent
color: checked ? _repeaterPal.buttonHighlight : _repeaterPal.button
QGCColoredImage {
@ -210,6 +214,7 @@ Rectangle { @@ -210,6 +214,7 @@ Rectangle {
preventStealing: true
onClicked: {
scope.focus = true
if (modelData.dropPanelComponent === undefined) {
dropPanel.hide()
if (modelData.toggle === true) {
@ -233,6 +238,7 @@ Rectangle { @@ -233,6 +238,7 @@ Rectangle {
}
}
}
}
Item {
width: 1

22
src/QtLocationPlugin/QMLControl/OfflineMap.qml

@ -345,17 +345,6 @@ QGCView { @@ -345,17 +345,6 @@ QGCView {
anchors.fill: parent
}
CenterMapDropButton {
anchors.margins: _margins
anchors.left: parent.left
anchors.top: parent.top
map: _map
z: QGroundControl.zOrderTopMost
showMission: false
showAllItems: false
visible: addNewSetView.visible
}
MapScale {
anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2
anchors.bottomMargin: anchors.leftMargin
@ -602,6 +591,17 @@ QGCView { @@ -602,6 +591,17 @@ QGCView {
} // Map
}
} // Item - Add new set view
CenterMapDropButton {
topMargin: 0
anchors.margins: _margins
anchors.left: map.left
anchors.top: map.top
map: _map
showMission: false
showAllItems: false
visible: addNewSetView.visible
}
} // Map
//-- Add new set dialog

Loading…
Cancel
Save