Handle initial null position from CCoordinateDialog

Summary:
CCoordinateDialog is setup with an initial null position. The user has to manually set one in case own aircraft position is de-selected to proceed with weather fetching. Previously the null position was accepted and passed on to the weather request with undefined results.

Reviewers: #swift_pilot_client

Maniphest Tasks: T406

Differential Revision: https://dev.swift-project.org/D81
This commit is contained in:
Roland Rossgotterer
2018-12-26 02:31:32 +01:00
committed by Mat Sutcliffe
parent 96b77c64d8
commit 3db811f11d
6 changed files with 93 additions and 26 deletions

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>280</width>
<height>396</height>
<width>307</width>
<height>459</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,6 +17,9 @@
<number>0</number>
</property>
<layout class="QVBoxLayout" name="vl_WeatherComponent">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
@@ -68,9 +71,40 @@
</property>
<item>
<widget class="QFrame" name="fr_Misc">
<layout class="QHBoxLayout" name="hl_Misc">
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="0" column="2" alignment="Qt::AlignRight">
<widget class="QPushButton" name="pb_SetPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show Position</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="cb_UseOwnAcftPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Use own aircraft position</string>
</property>
@@ -79,13 +113,6 @@
</property>
</widget>
</item>
<item alignment="Qt::AlignRight">
<widget class="QPushButton" name="pb_Coordinate">
<property name="text">
<string>coordinate</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -98,6 +125,9 @@
</item>
<item>
<widget class="QTabWidget" name="tw_weatherGrid">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tb_temperatureLayers">
<attribute name="title">
<string>Temperature</string>