From a2b1c3915ff62f532590acaa58a17a2e60821413 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 12 Mar 2016 22:35:36 +0100 Subject: [PATCH] + do not hide expression dialog when using the line edit's context-menu --- src/Gui/DlgExpressionInput.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index dc70038c135c..77a1c268f698 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) {