summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Fedoskin <afedoskin3@gmail.com>2016-11-05 19:32:19 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-11-05 19:32:19 (GMT)
commit0e8ed22342fc0d2fa9ef629f1bc874fb4be82586 (patch)
tree121b30bf728c5cecfde5f0be441352c1c6310d2f
parent2f928fbfa9441d5969121321731e1d6e3f9fb2e5 (diff)
Solve bug https://bugs.kde.org/show_bug.cgi?id=371998
-rw-r--r--kstars/kstarslite/qml/dialogs/helpers/LocationEdit.qml13
1 files changed, 8 insertions, 5 deletions
diff --git a/kstars/kstarslite/qml/dialogs/helpers/LocationEdit.qml b/kstars/kstarslite/qml/dialogs/helpers/LocationEdit.qml
index a2225f1..1e67f5e 100644
--- a/kstars/kstarslite/qml/dialogs/helpers/LocationEdit.qml
+++ b/kstars/kstarslite/qml/dialogs/helpers/LocationEdit.qml
@@ -143,6 +143,8 @@ KSPage {
PositionSource {
id: positionSource
+ property bool error: false
+
onSourceErrorChanged: {
if (sourceError == PositionSource.NoError)
return
@@ -156,8 +158,8 @@ KSPage {
}
notification.showNotification(errorDesc)
- active = false
- sourceError = positionSource.NoError
+ positionSource.stop()
+ error = true
locationLoading.close()
}
@@ -167,10 +169,11 @@ KSPage {
}
onActiveChanged: {
- if(positionSource.active) {
+ if(positionSource.active && !error) {
locationLoading.open()
} else if (!fetchingName) {
locationLoading.close()
+ error = false
}
}
@@ -185,7 +188,7 @@ KSPage {
locationFetched(lat, lng)
}
- tz = new Date().getTimezoneOffset()/60
+ tz = (new Date().getTimezoneOffset()/60)*-1
loadingText = xi18n("Please, wait while we are retrieving location name")
fetchingName = true // must be set to true before we are stopping positioning service
positionSource.stop()
@@ -198,7 +201,7 @@ KSPage {
}
function setTZComboBox(TZMinutes) {
- var TZ = TZMinutes/60
+ var TZ = (TZMinutes/60)*-1
comboBoxTZ.currentIndex = comboBoxTZ.find(TZ)
}