diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 5eaec5eb..a458a492 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -379,6 +379,15 @@ void lcMainWindow::CreateMenus() mViewpointMenu->addAction(mActions[LC_VIEW_VIEWPOINT_BOTTOM]); mViewpointMenu->addAction(mActions[LC_VIEW_VIEWPOINT_HOME]); + mProjectionMenu = new QMenu(tr("Projection"), this); + mProjectionMenu->addAction(mActions[LC_VIEW_PROJECTION_PERSPECTIVE]); + mProjectionMenu->addAction(mActions[LC_VIEW_PROJECTION_ORTHO]); + + mShadingMenu = new QMenu(tr("Sh&ading"), this); + mShadingMenu->addAction(mActions[LC_VIEW_SHADING_WIREFRAME]); + mShadingMenu->addAction(mActions[LC_VIEW_SHADING_FLAT]); + mShadingMenu->addAction(mActions[LC_VIEW_SHADING_DEFAULT_LIGHTS]); + QMenu* FileMenu = menuBar()->addMenu(tr("&File")); FileMenu->addAction(mActions[LC_FILE_NEW]); FileMenu->addAction(mActions[LC_FILE_OPEN]); @@ -440,13 +449,8 @@ void lcMainWindow::CreateMenus() ViewMenu->addAction(mActions[LC_VIEW_LOOK_AT]); ViewMenu->addMenu(mViewpointMenu); ViewMenu->addMenu(mCameraMenu); - QMenu* PerspectiveMenu = ViewMenu->addMenu(tr("Projection")); - PerspectiveMenu->addAction(mActions[LC_VIEW_PROJECTION_PERSPECTIVE]); - PerspectiveMenu->addAction(mActions[LC_VIEW_PROJECTION_ORTHO]); - QMenu* ShadingMenu = ViewMenu->addMenu(tr("Sh&ading")); - ShadingMenu->addAction(mActions[LC_VIEW_SHADING_WIREFRAME]); - ShadingMenu->addAction(mActions[LC_VIEW_SHADING_FLAT]); - ShadingMenu->addAction(mActions[LC_VIEW_SHADING_DEFAULT_LIGHTS]); + ViewMenu->addMenu(mProjectionMenu); + ViewMenu->addMenu(mShadingMenu); QMenu* StepMenu = ViewMenu->addMenu(tr("Ste&p")); StepMenu->addAction(mActions[LC_VIEW_TIME_FIRST]); StepMenu->addAction(mActions[LC_VIEW_TIME_PREVIOUS]); diff --git a/common/lc_mainwindow.h b/common/lc_mainwindow.h index a85bad35..e1719132 100644 --- a/common/lc_mainwindow.h +++ b/common/lc_mainwindow.h @@ -213,14 +213,24 @@ public: return mPartSelectionWidget; } + QMenu* GetViewpointMenu() const + { + return mViewpointMenu; + } + QMenu* GetCameraMenu() const { return mCameraMenu; } - QMenu* GetViewpointMenu() const + QMenu* GetProjectionMenu() const { - return mViewpointMenu; + return mProjectionMenu; + } + + QMenu* GetShadingMenu() const + { + return mShadingMenu; } bool DoDialog(LC_DIALOG_TYPE Type, void* Data); @@ -372,8 +382,10 @@ protected: QLabel* mStatusSnapLabel; QLabel* mStatusTimeLabel; - QMenu* mCameraMenu; QMenu* mViewpointMenu; + QMenu* mCameraMenu; + QMenu* mProjectionMenu; + QMenu* mShadingMenu; }; extern class lcMainWindow* gMainWindow; diff --git a/common/view.cpp b/common/view.cpp index 9637908d..3a649b86 100644 --- a/common/view.cpp +++ b/common/view.cpp @@ -413,8 +413,10 @@ void View::ShowContextMenu() const Popup->addSeparator(); - Popup->addMenu(gMainWindow->GetCameraMenu()); Popup->addMenu(gMainWindow->GetViewpointMenu()); + Popup->addMenu(gMainWindow->GetCameraMenu()); + Popup->addMenu(gMainWindow->GetProjectionMenu()); + Popup->addMenu(gMainWindow->GetShadingMenu()); Popup->addSeparator();