Salome HOME
Partial fix for '#16403 EDF 17034 - Hole during meshing visualization'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Displayer.cxx
index adeb2d7363d1caa0f629f80add5b618957f8a2f2..53bb6c4dd305710dd8f2f80e9c54676aadd8ad40 100644 (file)
@@ -46,7 +46,8 @@
 
 SMESHGUI_Displayer::SMESHGUI_Displayer( SalomeApp_Application* app )
 : LightApp_Displayer(),
-  myApp( app )
+  myApp( app ),
+  isNeedFitAll(false)
 {
 }
 
@@ -71,6 +72,7 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_
         anActor = SMESH::CreateActor( entry.toUtf8().data(), true );
       if( anActor )
       {
+        isNeedFitAll = SMESH::NoSmeshActors();
         SMESH::DisplayActor( wnd, anActor );
         prs = LightApp_Displayer::buildPresentation( entry.toUtf8().data(), aViewFrame );
       }
@@ -113,3 +115,13 @@ bool SMESHGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vi
   }
   return res;
 }
+
+void SMESHGUI_Displayer::Display( const QStringList& theList, const bool anUpdateViewer, SALOME_View* theView ) 
+{
+  LightApp_Displayer::Display( theList, anUpdateViewer, theView );
+  
+  if (isNeedFitAll) {
+    SMESH::FitAll();
+    isNeedFitAll = false;
+  }
+}
\ No newline at end of file