Skip to content
Snippets Groups Projects
Commit 1fba46d7 authored by marco's avatar marco
Browse files

cleanup dynamic casts in ContextMenu

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2216 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 659a5557
No related branches found
No related tags found
No related merge requests found
...@@ -148,10 +148,10 @@ void ContextMenu::ShowMenu(const QPoint& pos) ...@@ -148,10 +148,10 @@ void ContextMenu::ShowMenu(const QPoint& pos)
flags &= ~NOT_VISIBLE; flags &= ~NOT_VISIBLE;
} }
if(gfx_node->GetType()==0){flags &= ~NOT_SCENE;} if(gfx_node->GetType()==0){flags &= ~NOT_SCENE;}
if(!dynamic_cast<gfx::GfxObj*> (gfx_node.get())){flags &= ~GFX_OBJECT;} if(!dyn_cast<gfx::GfxObj> (gfx_node)){flags &= ~GFX_OBJECT;}
if(!dynamic_cast<gfx::Entity*> (gfx_node.get())){flags &= ~ENTITY;} if(!dyn_cast<gfx::Entity> (gfx_node)){flags &= ~ENTITY;}
#if OST_IMG_ENABLED #if OST_IMG_ENABLED
if(!dynamic_cast<gfx::MapIso*> (gfx_node.get())) if(!dyn_cast<gfx::MapIso>(gfx_node))
{ {
flags &= ~MAP; flags &= ~MAP;
} else { } else {
...@@ -165,11 +165,11 @@ void ContextMenu::ShowMenu(const QPoint& pos) ...@@ -165,11 +165,11 @@ void ContextMenu::ShowMenu(const QPoint& pos)
flags &= ~MAP_DSAMPLED_AVAIL; flags &= ~MAP_DSAMPLED_AVAIL;
} }
} }
if(!dynamic_cast<gfx::MapIso*> (gfx_node.get())){ if(!dyn_cast<gfx::MapIso> (gfx_node)){
flags &= ~MAP; flags &= ~MAP;
} }
if(!dynamic_cast<gfx::MapIso*> (gfx_node.get())){flags &= ~MAP;} if(!dyn_cast<gfx::MapIso> (gfx_node)){flags &= ~MAP;}
#endif // OST_IMG_ENABLED #endif // OST_IMG_ENABLED
} }
else{ else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment