diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-23 16:03:28 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-23 14:15:49 -0700 |
commit | 5b3d52acecbe9aac8dd6641fe04703696fa49380 (patch) | |
tree | 332a5d06e7600a4e736208eac191de4900ad8b0d /qt-ui/locationinformation.cpp | |
parent | d586970f3145106d444af8c54651af6563b92a66 (diff) | |
download | subsurface-5b3d52acecbe9aac8dd6641fe04703696fa49380.tar.gz |
Correctly fix the popup position
When the message to 'This dive site is being edited' was
being show while the popup to choose the dive site, the
line edit was being covered. now it correctly moves to
the correct place.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 6 |
1 files changed, 5 insertions, 1 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(); |