diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/locationinformation.cpp | 6 | ||||
-rw-r--r-- | qt-ui/locationinformation.h | 2 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 3b3e02b12..56ef2d7f3 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -489,7 +489,7 @@ void DiveLocationLineEdit::keyPressEvent(QKeyEvent *ev) } } -void DiveLocationLineEdit::showPopup() +void DiveLocationLineEdit::fixPopupPosition() { const QRect screen = QApplication::desktop()->availableGeometry(this); const int maxVisibleItems = 5; @@ -522,7 +522,11 @@ void DiveLocationLineEdit::showPopup() } view->setGeometry(pos.x(), pos.y(), w, h); +} +void DiveLocationLineEdit::showPopup() +{ + fixPopupPosition(); if (!view->isVisible()) { setTemporaryDiveSiteName(text()); proxy->invalidate(); diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h index db6809015..3e8adeae2 100644 --- a/qt-ui/locationinformation.h +++ b/qt-ui/locationinformation.h @@ -85,7 +85,7 @@ public: void itemActivated(const QModelIndex& index); DiveSiteType currDiveSiteType() const; uint32_t currDiveSiteUuid() const; - + void fixPopupPosition(); signals: void diveSiteSelected(uint32_t uuid); diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 8dca49eee..867d7a172 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -195,6 +195,9 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), connect(ReverseGeoLookupThread::instance(), &QThread::finished, this, &MainTab::setCurrentLocationIndex); + connect(ui.diveNotesMessage, &KMessageWidget::showAnimationFinished, + ui.location, &DiveLocationLineEdit::fixPopupPosition); + acceptingEdit = false; } |