+ Allow to select item in completion box with mouse

This commit is contained in:
wmayer 2015-10-17 13:40:47 +02:00
parent efd3a494d7
commit b6c2f8f822

View File

@ -213,7 +213,9 @@ void DlgExpressionInput::mousePressEvent(QMouseEvent* ev)
#endif
//we need to reject the dialog when clicked on the background. As the background is transparent
//this is the expected behaviour for the user
this->reject();
bool on = ui->expression->completerActive();
if (!on)
this->reject();
}
void DlgExpressionInput::showEvent(QShowEvent* ev)
@ -240,8 +242,12 @@ bool DlgExpressionInput::eventFilter(QObject *obj, QEvent *ev)
// on the size of the widget. Instead, it must be checked if the
// cursor is on this or an underlying widget or outside.
if (!underMouse()) {
qApp->removeEventFilter(this);
reject();
bool on = ui->expression->completerActive();
// Do this only if the completer is not shown
if (!on) {
qApp->removeEventFilter(this);
reject();
}
}
}