mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix correct size of the popup
Correct the popup visibility. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
317c3de91d
commit
dd21ab6b11
1 changed files with 2 additions and 4 deletions
|
@ -508,16 +508,14 @@ void DiveLocationLineEdit::setTemporaryDiveSiteName(const QString& s)
|
||||||
void DiveLocationLineEdit::keyPressEvent(QKeyEvent *ev)
|
void DiveLocationLineEdit::keyPressEvent(QKeyEvent *ev)
|
||||||
{
|
{
|
||||||
qDebug() << "Pressing key" << ev->key();
|
qDebug() << "Pressing key" << ev->key();
|
||||||
|
QLineEdit::keyPressEvent(ev);
|
||||||
if(ev->key() != Qt::Key_Left &&
|
if(ev->key() != Qt::Key_Left &&
|
||||||
ev->key() != Qt::Key_Right &&
|
ev->key() != Qt::Key_Right &&
|
||||||
ev->key() != Qt::Key_Escape &&
|
ev->key() != Qt::Key_Escape &&
|
||||||
ev->key() != Qt::Key_Return &&
|
ev->key() != Qt::Key_Return ) {
|
||||||
!view->isVisible()) {
|
|
||||||
showPopup();
|
showPopup();
|
||||||
} else if (ev->key() == Qt::Key_Escape) {
|
} else if (ev->key() == Qt::Key_Escape) {
|
||||||
view->hide();
|
view->hide();
|
||||||
} else {
|
|
||||||
QLineEdit::keyPressEvent(ev);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue