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:
@@ -34,6 +34,7 @@
|
||||
# include <cfloat>
|
||||
# include <QFuture>
|
||||
# include <QFutureWatcher>
|
||||
# include <QKeyEvent>
|
||||
# include <QtConcurrentMap>
|
||||
# include <boost/bind.hpp>
|
||||
# include <Python.h>
|
||||
@@ -176,6 +177,13 @@ void CrossSections::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void CrossSections::keyPressEvent(QKeyEvent* ke)
|
||||
{
|
||||
// The cross-sections dialog is embedded into a task panel
|
||||
// which is a parent widget and will handle the event
|
||||
ke->ignore();
|
||||
}
|
||||
|
||||
void CrossSections::accept()
|
||||
{
|
||||
apply();
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void keyPressEvent(QKeyEvent*);
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_xyPlane_clicked();
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -65,6 +65,7 @@ protected:
|
||||
void findShapes();
|
||||
bool canExtrude(const TopoDS_Shape&) const;
|
||||
void changeEvent(QEvent *e);
|
||||
void keyPressEvent(QKeyEvent*);
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_rbDirModeCustom_toggled(bool on);
|
||||
|
||||
@@ -315,6 +315,13 @@ void DlgRevolution::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void DlgRevolution::keyPressEvent(QKeyEvent* ke)
|
||||
{
|
||||
// The revolution dialog is embedded into a task panel
|
||||
// which is a parent widget and will handle the event
|
||||
ke->ignore();
|
||||
}
|
||||
|
||||
void DlgRevolution::findShapes()
|
||||
{
|
||||
App::Document* activeDoc = App::GetApplication().getActiveDocument();
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void keyPressEvent(QKeyEvent*);
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_selectLine_clicked();
|
||||
|
||||
Reference in New Issue
Block a user