Commit 4b37a65d authored by Jan Möbius's avatar Jan Möbius

Check if a type exists before adding a context menu for it

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9358 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 48079beb
......@@ -71,11 +71,21 @@ void ViewControlPlugin::pluginsInitialized() {
emit addContextMenuItem(viewControlMenu_->menuAction() , DATA_TRIANGLE_MESH , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , DATA_POLY_MESH , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("PolyVolMesh") , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TetMeshCGAL") , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("Volume") , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("BSplineSurface"), CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TSplineMesh"), CONTEXTOBJECTMENU );
if ( typeExists("PolyVolMesh") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("PolyVolMesh") , CONTEXTOBJECTMENU );
if ( typeExists("TetMeshCGAL") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TetMeshCGAL") , CONTEXTOBJECTMENU );
if ( typeExists("Volume") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("Volume") , CONTEXTOBJECTMENU );
if ( typeExists("BSplineSurface") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("BSplineSurface"), CONTEXTOBJECTMENU );
if ( typeExists("TSplineMesh") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TSplineMesh"), CONTEXTOBJECTMENU );
connect( viewControlMenu_, SIGNAL( triggered(QAction*) ), this, SLOT( contextMenuTriggered(QAction*) ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment