]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
IPAL21003 Impossible create group from existing group shown only
authordmv <dmv@opencascade.com>
Mon, 13 Apr 2009 07:08:56 +0000 (07:08 +0000)
committerdmv <dmv@opencascade.com>
Mon, 13 Apr 2009 07:08:56 +0000 (07:08 +0000)
src/SMESHGUI/SMESHGUI_GroupDlg.cxx

index 5b3b5e22c9822d9cc0d3e6115fbc62be1b972cc6..1fbdabfad59f94b6d3a1fe2f3971efa80b47821b 100644 (file)
@@ -2205,12 +2205,10 @@ bool SMESHGUI_GroupDlg::SetAppropriateActor()
       // iterate on all actors in current view window, search for
       // any visible actor, that belongs to group or submesh of current mesh
       vtkActorCollection *aCollection = aViewWindow->getRenderer()->GetActors();
-      aCollection->InitTraversal();
-      for (vtkActor *anAct = aCollection->GetNextActor();
-           anAct && !isActor;
-           anAct = aCollection->GetNextActor())
+      int nbItems = aCollection->GetNumberOfItems();
+      for (int i=0; i<nbItems; i++)
       {
-        SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(anAct);
+        SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>(aCollection->GetItemAsObject(i));
         if (anActor && anActor->hasIO()) {
           Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
           if (aViewWindow->isVisible(anIO)) {