Skip to content

Commit

Permalink
+ do not hide expression dialog when using the line edit's context-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 12, 2016
1 parent 5c3024e commit a2b1c39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Gui/DlgExpressionInput.cpp
Expand Up @@ -24,6 +24,7 @@
#include <QApplication>
#include <QPainter>
#include <QDesktopWidget>
#include <QMenu>
#include <QMouseEvent>

#include "DlgExpressionInput.h"
Expand Down Expand Up @@ -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<QMenu*>(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) {
Expand Down

0 comments on commit a2b1c39

Please sign in to comment.