From aee9359da1fbfd66578a5b43bc1701f5e75b279f Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 11 Sep 2018 21:12:04 +0200 Subject: [PATCH] ignore key events in placement dialog and let parent task panel handle them --- src/Gui/Placement.cpp | 7 +++++++ src/Gui/Placement.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 630e273ebe..ddcc4a9f38 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -310,6 +310,13 @@ void Placement::on_applyIncrementalPlacement_toggled(bool on) } } +void Placement::keyPressEvent(QKeyEvent* ke) +{ + // The placement dialog is embedded into a task panel + // which is a parent widget and will handle the event + ke->ignore(); +} + void Placement::reject() { Base::Placement plm; diff --git a/src/Gui/Placement.h b/src/Gui/Placement.h index f2926fddb9..b5f546090a 100644 --- a/src/Gui/Placement.h +++ b/src/Gui/Placement.h @@ -57,6 +57,7 @@ public: protected: void changeEvent(QEvent *e); + void keyPressEvent(QKeyEvent*); private Q_SLOTS: void on_applyButton_clicked();