Commit 7ab86a97 authored by Gus Grubba's avatar Gus Grubba

Skip custom instrument widget test if none exists.

parent 3a2a3584
...@@ -101,7 +101,7 @@ FlightMap { ...@@ -101,7 +101,7 @@ FlightMap {
var vehiclePoint = flightMap.fromCoordinate(_activeVehicleCoordinate, false /* clipToViewport */) var vehiclePoint = flightMap.fromCoordinate(_activeVehicleCoordinate, false /* clipToViewport */)
var toolStripRightEdge = mapFromItem(toolStrip, toolStrip.x, 0).x + toolStrip.width var toolStripRightEdge = mapFromItem(toolStrip, toolStrip.x, 0).x + toolStrip.width
var instrumentsWidth = 0 var instrumentsWidth = 0
if (QGroundControl.corePlugin.options.instrumentWidget.widgetPosition === CustomInstrumentWidget.POS_TOP_RIGHT) { if (QGroundControl.corePlugin.options.instrumentWidget && QGroundControl.corePlugin.options.instrumentWidget.widgetPosition === CustomInstrumentWidget.POS_TOP_RIGHT) {
// Assume standard instruments // Assume standard instruments
instrumentsWidth = flightDisplayViewWidgets.getPreferredInstrumentWidth() instrumentsWidth = flightDisplayViewWidgets.getPreferredInstrumentWidth()
} }
......
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