mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d586970f31
commit
5b3d52acec
3 changed files with 9 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue