From 2c1e6da6992dd3fb2f14bef0a36569e3ac34ce7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 4 Aug 2017 18:32:21 -0300 Subject: [PATCH] Survey: Change entry when moving windrose direction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/PlanView/SurveyItemEditor.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PlanView/SurveyItemEditor.qml b/src/PlanView/SurveyItemEditor.qml index bf9da32d9..6da1b62f1 100644 --- a/src/PlanView/SurveyItemEditor.qml +++ b/src/PlanView/SurveyItemEditor.qml @@ -582,6 +582,7 @@ Rectangle { visible: !windRoseButton.visible } FactComboBox { + id: gridAngleBox fact: missionItem.gridEntryLocation visible: !windRoseButton.visible indexModel: false @@ -738,6 +739,15 @@ Rectangle { windRosePie.angle = angle gridAngleText.text = angle gridAngleText.editingFinished() + if(angle > -135 && angle <= -45) { + gridAngleBox.activated(2) // or 3 + } else if(angle > -45 && angle <= 45) { + gridAngleBox.activated(2) // or 0 + } else if(angle > 45 && angle <= 135) { + gridAngleBox.activated(1) // or 0 + } else if(angle > 135 || angle <= -135) { + gridAngleBox.activated(1) // or 3 + } } } } -- 2.22.0