Merge pull request #24277 from ryankembrey/werner_fix_23504
Gui: Do not accept changes when pressing ESC key in 3D view
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
|
||||
# include <QApplication>
|
||||
# include <QKeyEvent>
|
||||
# include <QTimer>
|
||||
# include <Inventor/SoPickedPoint.h>
|
||||
# include <Inventor/actions/SoGetBoundingBoxAction.h>
|
||||
@@ -48,6 +49,7 @@
|
||||
#include "Application.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "Document.h"
|
||||
#include "DockWindowManager.h"
|
||||
#include "SoFCDB.h"
|
||||
#include "View3DInventor.h"
|
||||
#include "View3DInventorViewer.h"
|
||||
@@ -234,6 +236,12 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node)
|
||||
}
|
||||
}
|
||||
|
||||
DockWindowManager* pDockMgr = DockWindowManager::instance();
|
||||
if (QWidget* widget = pDockMgr->getDockWindow("Tasks")) {
|
||||
QKeyEvent ev(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
|
||||
qApp->postEvent(widget, &ev);
|
||||
}
|
||||
|
||||
auto func = new Gui::TimerFunction();
|
||||
func->setAutoDelete(true);
|
||||
func->setFunction([doc]() {
|
||||
|
||||
Reference in New Issue
Block a user