diff options
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r-- | qt-ui/globe.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 5d3418662..1343734c5 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -76,7 +76,7 @@ void GlobeGPS::reload() void GlobeGPS::centerOn(dive* dive) { // dive has changed, if we had the 'editingDive', hide it. - if(messageWidget->isVisible()){ + if(messageWidget->isVisible() && (!dive || dive_has_gps_location(dive))){ messageWidget->animatedHide(); } @@ -95,10 +95,12 @@ void GlobeGPS::centerOn(dive* dive) void GlobeGPS::prepareForGetDiveCoordinates(dive* dive) { - messageWidget->setMessageType(KMessageWidget::Warning); - messageWidget->setText(QObject::tr("This dive has no location! Please move the planet to the desired position, then double-click to set the new location for this dive.")); - messageWidget->animatedShow(); - + if (!messageWidget->isVisible()) { + messageWidget->setMessageType(KMessageWidget::Warning); + messageWidget->setText(QObject::tr("This dive has no location! Please move the planet to the desired position, then double-click to set the new location for this dive.")); + messageWidget->setWordWrap(true); + messageWidget->animatedShow(); + } editingDiveCoords = dive; } |