disable ESC button support in View3DInventor::keyEvent() for Qt5 because changing MDI view mode causes rendering artifacts
This commit is contained in:
@@ -964,6 +964,12 @@ bool View3DInventor::eventFilter(QObject* watched, QEvent* e)
|
||||
|
||||
void View3DInventor::keyPressEvent (QKeyEvent* e)
|
||||
{
|
||||
// See StdViewDockUndockFullscreen::activated()
|
||||
// With Qt5 one cannot directly use 'setCurrentViewMode'
|
||||
// of an MDI view because it causes rendering problems.
|
||||
// The only reliable solution is to clone the MDI view,
|
||||
// set its view mode and close the original MDI view.
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
ViewMode mode = MDIView::currentViewMode();
|
||||
if (mode != Child) {
|
||||
// If the widget is in fullscreen mode then we can return to normal mode either
|
||||
@@ -972,6 +978,7 @@ void View3DInventor::keyPressEvent (QKeyEvent* e)
|
||||
setCurrentViewMode(Child);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QMainWindow::keyPressEvent(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user