diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-12 18:01:27 -0200 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-12 18:04:03 -0200 |
commit | 95a77b04a6855b26d340aaca5e3030a7d1a7cb3c (patch) | |
tree | 7f636d927f7d31f0972496387325332a098e529d /main_view.qml | |
parent | 7a07231716f04ee98091a946e122056e1fa69686 (diff) |
Many bugfixes related to ProjectionObserver.
* Correct handling of relative metrics in UI
* undo(), reset() methods added
* Main class responsible for undoing and resetting both history
and the observer (MUST BE AT THE SAME TIME! -- this might indicate
a design issue to be addressed in the future)
Diffstat (limited to 'main_view.qml')
-rw-r--r-- | main_view.qml | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/main_view.qml b/main_view.qml index 65e1095..fd4bd4a 100644 --- a/main_view.qml +++ b/main_view.qml @@ -217,6 +217,7 @@ ApplicationWindow { Layout.alignment: Qt.AlignTop | Qt.AlignLeft GroupBox { + Layout.fillWidth: true title: "Control points" checkable: true __checkbox.onClicked: { @@ -285,6 +286,7 @@ ApplicationWindow { } GroupBox { + Layout.fillWidth: true title: "Regular points" checked: true checkable: true @@ -392,7 +394,9 @@ ApplicationWindow { GroupBox { Layout.fillWidth: true + id: metricsGroupBox title: "Projection metrics" + property RadioButton current: currentMetricRadioButton Column { ExclusiveGroup { id: wrtMetricsGroup } @@ -402,7 +406,13 @@ ApplicationWindow { text: "Current" exclusiveGroup: wrtMetricsGroup checked: true - onClicked: Main.setObserverType(Main.ObserverCurrent) + onClicked: { + if (!Main.setObserverType(Main.ObserverCurrent)) { + metricsGroupBox.current.checked = true; + } else { + metricsGroupBox.current = this; + } + } } RadioButton { id: diffPreviousMetricRadioButton @@ -410,19 +420,21 @@ ApplicationWindow { exclusiveGroup: wrtMetricsGroup onClicked: { if (!Main.setObserverType(Main.ObserverDiffPrevious)) { - this.checked = false; - currentMetricRadioButton.checked = true; + metricsGroupBox.current.checked = true; + } else { + metricsGroupBox.current = this; } } } RadioButton { - id: diffOriginalMetricRadioButton + id: diffFirstMetricRadioButton text: "Diff. to first" exclusiveGroup: wrtMetricsGroup onClicked: { if (!Main.setObserverType(Main.ObserverDiffFirst)) { - this.checked = false; - currentMetricRadioButton.checked = true; + metricsGroupBox.current.checked = true; + } else { + metricsGroupBox.current = this; } } } |