Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13
[modules/smesh.git] / src / OBJECT / SMESH_PreviewActorsCollection.cxx
index a88218c2050254ccab33fc109db440432b308e23..9d6d1c80f5513eb6407a305b07c6a4f701b51a96 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -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;