diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index 2d8b5717f..dc70038c1 100644 --- a/src/Gui/DlgExpressionInput.cpp +++ b/src/Gui/DlgExpressionInput.cpp @@ -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(); + } } }