Salome HOME
Merge from OCC_development_generic_2006
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI.cxx
index 35c14746b24e011c755b6af81a9903c467ada8cf..4f75dfb09c80fcfbc246399f16d9127643861bfb 100644 (file)
 //  Author : Francis KLOSS
 //  Module : SUPERV
 
-using namespace std;
 #include "SUPERVGUI.h"
 #include "SUPERVGUI_DataModel.h"
 #include "SUPERVGUI_Selection.h"
 
-
-#include "SALOMEDSClient.hxx"
-#include <boost/shared_ptr.hpp>
-using namespace boost;
-
 #include "CAM_Application.h"
 #include "OB_Browser.h"
 #include "OB_ListItem.h"
@@ -63,6 +57,10 @@ using namespace boost;
 #include <qinputdialog.h>
 #include <qmenubar.h>
 
+#include "SALOMEDSClient.hxx"
+#include <boost/shared_ptr.hpp>
+using namespace boost;
+
 int SUPERVGUI::factory = 0;
 
 extern "C" {
@@ -489,6 +487,8 @@ void SUPERVGUI::displayDataflow() {
     else {
       // second case : get empty initial view frame as new ViewFrame object
       aViewFrame = myInitialViewFrame;
+      // mkr : PAL8237 : remove first "gag" Main from children
+      aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
     }
 
     if( aViewFrame ) {
@@ -678,6 +678,8 @@ bool SUPERVGUI::createDataflow( const NEW_DF_MODE mode, bool theInitialDF ) {
   else {
     // 2. get empty initial view frame as new ViewFrame object
     aViewFrame = myInitialViewFrame;
+    // mkr : PAL8237 : remove first "gag" Main from children
+    aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
   }
 
   if ( aViewFrame ) {