Salome HOME
0014047: EDF PAL 334 : Problem to select merged face with Create group window
[modules/geom.git] / src / DisplayGUI / DisplayGUI.cxx
index c458fcec522b1622c393d5094fcb4e0ce4b04ff2..e35c95e41b434e9067acf8bf24e31139ee183b46 100644 (file)
@@ -1,35 +1,32 @@
-//  GEOM GEOMGUI : GUI for Geometry component
+// GEOM GEOMGUI : GUI for Geometry component
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
 // 
-//  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. 
+// 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. 
 // 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
+// This library is distributed in the hope that it will be useful, 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details. 
 // 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// You should have received a copy of the GNU Lesser General Public 
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// File   : DisplayGUI.cxx
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
 //
-//
-//  File   : DisplayGUI.cxx
-//  Author : Vadim SANDLER
-//  Module : GEOM
-//  $Header$
 
 #include "DisplayGUI.h"
-#include "GeometryGUI.h"
-#include "GEOM_Displayer.h"
-#include "GEOM_AISShape.hxx"
+#include <GeometryGUI.h>
+#include <GEOM_Displayer.h>
+#include <GEOM_AISShape.hxx>
 
 #include <SUIT_Desktop.h>
 #include <SUIT_ViewWindow.h>
@@ -58,7 +55,6 @@
 
 #include <QAction>
 
-
 //=======================================================================
 // function : DisplayGUI::DisplayGUI()
 // purpose  : Constructor
@@ -327,7 +323,13 @@ void DisplayGUI::Erase()
       listIO.Append( anIObject );
     }
   }
-  GEOM_Displayer(anActiveStudy).Erase( listIO, true );
+
+  SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
+  bool aIsForced = true;
+  if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
+    aIsForced = false;
+
+  GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
   getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
 }
 
@@ -470,7 +472,9 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
 //=====================================================================================
 extern "C"
 {
- GEOM_DISPLAYGUI_EXPORT
+#ifdef WIN32
+  __declspec( dllexport )
+#endif
   GEOMGUI* GetLibGUI( GeometryGUI* parent )
   {
     return new DisplayGUI( parent );