Salome HOME
Merge branch V7_3_1_BR
[modules/smesh.git] / src / OBJECT / SMESH_PreviewActorsCollection.cxx
index b5e145cc5513398218277e5249196c9a52f4e8d9..397aeebb967a4c4a15619fdfd86f1d2cbbc1eb31 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -65,8 +65,8 @@ SMESH_PreviewActorsCollection::~SMESH_PreviewActorsCollection()
 }
 
 bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape,
-                                         TopAbs_ShapeEnum theType,
-                                         const QString& theEntry )
+                                          TopAbs_ShapeEnum theType,
+                                          const QString& theEntry )
 {
   SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
 
@@ -77,7 +77,7 @@ bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape,
   myMapOfShapes.Clear();
   myIndices.clear();
   myCurrentChunk = 0;
-  myChunkSize = mgr->integerValue( "SMESH", "preview_actor_chunk_size", 100 );
+  myChunkSize = qMax(1, mgr->integerValue( "SMESH", "preview_actor_chunk_size", 100 ) );
 
   if ( theShape.IsNull() )
     return false;