Commit b5a2626b authored by Dirk Wilden's avatar Dirk Wilden
Browse files

fixed selection modes

feature conversion is now additive

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5353 383ad7c9-94d9-4d36-a494-682f7c89f535
parent af77aadf
......@@ -240,14 +240,14 @@ void SelectionPlugin::pluginsInitialized() {
toolBar_->addAction( connectedAction_ );
connect( toolBarActions_, SIGNAL( triggered(QAction*) ), this, SLOT(toolBarActionClicked(QAction*)) );
connect( toolBarTypes_, SIGNAL( triggered(QAction*) ), this, SLOT(toolBarActionClicked(QAction*)) );
connect( toolBarTypes_, SIGNAL( triggered(QAction*) ), this, SLOT(toolBarActionClicked(QAction*)) );
//connect the toolbar Actions to the Toolbox Buttons
connect( tool_->objectSelection, SIGNAL(clicked(bool)), objectAction_, SLOT(setChecked(bool)) );
connect( tool_->vertexSelection, SIGNAL(clicked(bool)), vertexAction_, SLOT(setChecked(bool)) );
connect( tool_->edgeSelection, SIGNAL(clicked(bool)), edgeAction_, SLOT(setChecked(bool)) );
connect( tool_->faceSelection, SIGNAL(clicked(bool)), faceAction_, SLOT(setChecked(bool)) );
connect( tool_->objectSelection, SIGNAL(clicked()), objectAction_, SLOT(trigger()) );
connect( tool_->vertexSelection, SIGNAL(clicked()), vertexAction_, SLOT(trigger()) );
connect( tool_->edgeSelection, SIGNAL(clicked()), edgeAction_, SLOT(trigger()) );
connect( tool_->faceSelection, SIGNAL(clicked()), faceAction_, SLOT(trigger()) );
connect( objectAction_, SIGNAL(toggled(bool)),tool_->objectSelection , SLOT(setChecked(bool)) );
connect( vertexAction_, SIGNAL(toggled(bool)),tool_->vertexSelection , SLOT(setChecked(bool)) );
......
......@@ -220,28 +220,31 @@ void SelectionPlugin::set_features(MeshType* _mesh)
if (selectionType_ & VERTEX){
typename MeshType::VertexIter v_it, v_end=_mesh->vertices_end();
for (v_it=_mesh->vertices_begin(); v_it!=v_end; ++v_it){
_mesh->status(v_it).set_feature( _mesh->status(v_it).selected() );
_mesh->status(v_it).set_selected( false );
}
for (v_it=_mesh->vertices_begin(); v_it!=v_end; ++v_it)
if ( _mesh->status(v_it).selected() ){
_mesh->status(v_it).set_feature( _mesh->status(v_it).selected() );
_mesh->status(v_it).set_selected( false );
}
}
if (selectionType_ & EDGE){
typename MeshType::EdgeIter e_it, e_end( _mesh->edges_end() );
for (e_it=_mesh->edges_begin(); e_it!=e_end; ++e_it){
_mesh->status(e_it).set_feature( _mesh->status(e_it).selected() );
_mesh->status(e_it).set_selected( false );
}
for (e_it=_mesh->edges_begin(); e_it!=e_end; ++e_it)
if ( _mesh->status(e_it).selected() ){
_mesh->status(e_it).set_feature( _mesh->status(e_it).selected() );
_mesh->status(e_it).set_selected( false );
}
}
if (selectionType_ & FACE){
typename MeshType::FaceIter f_it, f_end( _mesh->faces_end() );
for (f_it=_mesh->faces_begin(); f_it!=f_end; ++f_it){
_mesh->status(f_it).set_feature( _mesh->status(f_it).selected() );
_mesh->status(f_it).set_selected( false );
}
for (f_it=_mesh->faces_begin(); f_it!=f_end; ++f_it)
if ( _mesh->status(f_it).selected() ){
_mesh->status(f_it).set_feature( _mesh->status(f_it).selected() );
_mesh->status(f_it).set_selected( false );
}
}
}
......
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