Skip to content
Snippets Groups Projects
Commit 9fcd4b5f authored by stefan's avatar stefan
Browse files

SceneWin:

 - Fixed Deselect All
 - Fixed Compiling without IMG

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2004 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 9846f594
No related branches found
No related tags found
No related merge requests found
...@@ -278,9 +278,8 @@ void SceneSelection::SelectAllViews(){ ...@@ -278,9 +278,8 @@ void SceneSelection::SelectAllViews(){
void SceneSelection::DeselectAllViews(){ void SceneSelection::DeselectAllViews(){
mol::EntityView sel = view_entity_->GetSelection(); mol::EntityView sel = view_entity_->GetSelection();
if(sel.IsValid()){ if(sel.IsValid()){
for(unsigned int i= 0; i < views_.size(); i++){ sel = mol::Difference(sel, this->GetViewUnion());
sel = mol::Difference(sel, views_[i].GetEntityView()); view_entity_->SetSelection(sel);
}
} }
} }
......
...@@ -44,7 +44,9 @@ public: ...@@ -44,7 +44,9 @@ public:
public slots: public slots:
void CenterOnObjects(); void CenterOnObjects();
void Delete(); void Delete();
#if OST_IMG_ENABLED
void ViewDensitySlices(); void ViewDensitySlices();
#endif // OST_IMG_ENABLED
void CopyViews(); void CopyViews();
void Select(); void Select();
void Deselect(); void Deselect();
......
...@@ -72,11 +72,16 @@ void ContextMenu::ShowMenu(const QPoint& pos) ...@@ -72,11 +72,16 @@ void ContextMenu::ShowMenu(const QPoint& pos)
if(gfx_node->GetType()==0){all_not_scene = false;} if(gfx_node->GetType()==0){all_not_scene = false;}
if(!dynamic_cast<gfx::GfxObj*> (gfx_node.get())){all_gfx_objects = false;} if(!dynamic_cast<gfx::GfxObj*> (gfx_node.get())){all_gfx_objects = false;}
if(!dynamic_cast<gfx::Entity*> (gfx_node.get())){all_entities = false;} if(!dynamic_cast<gfx::Entity*> (gfx_node.get())){all_entities = false;}
#if OST_IMG_ENABLED
if(!dynamic_cast<gfx::MapIso*> (gfx_node.get())){all_maps = false;} if(!dynamic_cast<gfx::MapIso*> (gfx_node.get())){all_maps = false;}
#else
all_maps = false;
#endif // OST_IMG_ENABLED
} }
else{ else{
all_gfx_objects = false; all_gfx_objects = false;
all_entities = false; all_entities = false;
all_maps = false;
all_visible = true; all_visible = true;
all_hidden = true; all_hidden = true;
} }
...@@ -154,14 +159,12 @@ void ContextMenu::ShowMenu(const QPoint& pos) ...@@ -154,14 +159,12 @@ void ContextMenu::ShowMenu(const QPoint& pos)
} }
#if OST_IMG_ENABLED #if OST_IMG_ENABLED
if(all_maps){ if(all_maps){
action = menu->addAction("View Density Slices"); action = menu->addAction("View Density Slices");
connect(action, SIGNAL(triggered()), SceneSelection::Instance(), SLOT(ViewDensitySlices())); connect(action, SIGNAL(triggered()), SceneSelection::Instance(), SLOT(ViewDensitySlices()));
} }
#endif // OST_IMG_ENABLED
#endif // OST_IMG_ENABLED
if(all_entity_views){ if(all_entity_views){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment