Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to paraview 5.4
[modules/gui.git]
/
src
/
SVTK
/
SVTK_Renderer.cxx
diff --git
a/src/SVTK/SVTK_Renderer.cxx
b/src/SVTK/SVTK_Renderer.cxx
index 6a6420e6fc88755712f20b4faab34970e20b00ab..b763565036dee2438591f8b4603b66b894139a1c 100644
(file)
--- a/
src/SVTK/SVTK_Renderer.cxx
+++ b/
src/SVTK/SVTK_Renderer.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-708,10
+708,15
@@
void SVTK_Renderer::onFitSelection()
vtkActorCollection* aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while ( vtkActor* aProp = aCollection->GetNextActor() )
vtkActorCollection* aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while ( vtkActor* aProp = aCollection->GetNextActor() )
- if ( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aProp ) )
- if ( mySelector->IsSelected( anActor ) )
+ if ( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aProp ) ) {
+ const Handle(SALOME_InteractiveObject)& io = anActor->getIO();
+ if ( !io.IsNull() && mySelector->IsSelected( io ) )
aSelectedCollection->AddItem( aProp );
aSelectedCollection->AddItem( aProp );
-
+ }
+
+ if( aSelectedCollection->GetNumberOfItems() == 0 )
+ return; // if collection is empty
+
double bounds[6];
::ComputeBounds( aSelectedCollection, bounds );
double bounds[6];
::ComputeBounds( aSelectedCollection, bounds );