Ignore key events in dialogs and let parent task panel handle them

The affected dialogs are:
* Texture mapping
* Cross-sections
* Extrusion
* Revolution
This commit is contained in:
wmayer
2018-09-13 11:13:33 +02:00
parent adb2fb6e04
commit aef87aeec5
8 changed files with 47 additions and 1 deletions

View File

@@ -34,6 +34,7 @@
# include <TopExp_Explorer.hxx>
# include <ShapeExtend_Explorer.hxx>
# include <TopTools_HSequenceOfShape.hxx>
# include <QKeyEvent>
# include <QMessageBox>
# include <Python.h>
# include <Inventor/system/inttypes.h>
@@ -147,6 +148,13 @@ void DlgExtrusion::changeEvent(QEvent *e)
QDialog::changeEvent(e);
}
void DlgExtrusion::keyPressEvent(QKeyEvent* ke)
{
// The extrusion dialog is embedded into a task panel
// which is a parent widget and will handle the event
ke->ignore();
}
void DlgExtrusion::on_rbDirModeCustom_toggled(bool on)
{
if(on) //this check prevents dual fire of dirmode changed - on radio buttons, one will come on, and other will come off, causing two events.