diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index dc70038c1..77a1c268f 100644 --- a/src/Gui/DlgExpressionInput.cpp +++ b/src/Gui/DlgExpressionInput.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "DlgExpressionInput.h" @@ -242,6 +243,11 @@ 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()) { + // if the expression fields context-menu is open do not close the dialog + QMenu* menu = qobject_cast(obj); + if (menu && menu->parentWidget() == ui->expression) { + return false; + } bool on = ui->expression->completerActive(); // Do this only if the completer is not shown if (!on) {