From: asl Date: Fri, 17 Jun 2005 04:56:15 +0000 (+0000) Subject: Bug 9193: X-Git-Tag: T3_0_0_a4~100 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f1b227f298ef45425e08048d72eead0d826e455;p=modules%2Fgui.git Bug 9193: Only nodes mode in "Display mode" popup in SMESH --- diff --git a/src/SalomeApp/SalomeApp_VTKSelector.cxx b/src/SalomeApp/SalomeApp_VTKSelector.cxx index b75f99b40..a23a150ad 100644 --- a/src/SalomeApp/SalomeApp_VTKSelector.cxx +++ b/src/SalomeApp/SalomeApp_VTKSelector.cxx @@ -4,10 +4,15 @@ #include "SVTK_ViewModel.h" #include "SVTK_Selector.h" #include "SVTK_ViewWindow.h" -#include "SALOME_Actor.h" +#include "SVTK_Functor.h" +#include "SALOME_Actor.h" #include "SALOME_ListIteratorOfListIO.hxx" +#include "VTKViewer_Algorithm.h" + +#include + #include "utilities.h" #ifdef _DEBUG_ @@ -94,6 +99,9 @@ SalomeApp_VTKSelector TColStd_IndexedMapOfInteger anIds; aSelector->GetIndex(anIO,anIds); SALOME_Actor* anActor = aSelector->GetActor(anIO); + if( !anActor ) + anActor = VTK::Find(aView->getRenderer()->GetActors(),VTK::TIsSameIObject(anIO)); + aList.append(new SalomeApp_SVTKDataOwner(anIO,anIds,aMode,anActor)); if(MYDEBUG) MESSAGE("VTKSelector::getSelection - "<getEntry()); } @@ -120,10 +128,12 @@ SalomeApp_VTKSelector if(const SalomeApp_SVTKDataOwner* anOwner = dynamic_cast(aDataOwner)){ aSelector->SetSelectionMode(anOwner->GetMode()); Handle(SALOME_InteractiveObject) anIO = anOwner->IO(); + if( anOwner->GetActor() ) aSelector->AddIObject( anOwner->GetActor() ); else aSelector->AddIObject(anIO); + anAppendList.Append(anIO); aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false); if(MYDEBUG) MESSAGE("VTKSelector::setSelection - SVTKDataOwner - "<getEntry());