diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 458993b560..d53de6ff6d 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -810,12 +810,9 @@ bool MainWindow::event(QEvent *e) if (!temp) return true; View3DInventorViewer *view = temp->getViewer(); - if (!view) - return true; - QWidget *viewWidget = view->getGLWidget(); - if (viewWidget) { + if (view) { Spaceball::MotionEvent anotherEvent(*motionEvent); - qApp->sendEvent(viewWidget, &anotherEvent); + qApp->sendEvent(view, &anotherEvent); } return true; }else if(e->type() == QEvent::StatusTip) {