X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDisplayGUI%2FDisplayGUI.cxx;h=e35c95e41b434e9067acf8bf24e31139ee183b46;hb=6c057505a6e4bcff162cfb8b86deeda0eefff60a;hp=504f861f6063fbda972ddca7d698df5bcbf5cb87;hpb=c2ae4af70baf364fd78aabe14477db040adccac7;p=modules%2Fgeom.git diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index 504f861f6..e35c95e41 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -1,44 +1,41 @@ -// 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 +#include +#include #include -#include #include #include #include #include -#include +#include #include #include @@ -56,8 +53,7 @@ #include -#include - +#include //======================================================================= // function : DisplayGUI::DisplayGUI() @@ -94,7 +90,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) { InvertDisplayMode(); int newMode = GetDisplayMode(); - getGeometryGUI()->action( 211 )->setMenuText + getGeometryGUI()->action( 211 )->setText ( newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") ); getGeometryGUI()->menuMgr()->update(); break; @@ -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,8 +472,8 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) +#ifdef WIN32 + __declspec( dllexport ) #endif GEOMGUI* GetLibGUI( GeometryGUI* parent ) {