1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : GEOMBase_Tools.cxx
25 // Author : Damien COQUERET
29 #include "GEOMToolsGUI.h"
31 #include "GeometryGUI.h"
32 #include "GEOM_Actor.h"
34 #include "GEOMBase_aWarningDlg.h"
36 #include "GEOM_Operation.h"
37 #include "GEOM_Displayer.h"
39 #include <SUIT_Session.h>
40 #include <SUIT_Application.h>
41 #include <SUIT_OverrideCursor.h>
42 #include <SUIT_MessageBox.h>
43 #include <SUIT_Tools.h>
44 #include <SUIT_FileDlg.h>
45 #include <SUIT_Desktop.h>
46 #include <SUIT_ViewModel.h>
48 #include <SalomeApp_Application.h>
49 #include <SalomeApp_Study.h>
50 #include <LightApp_SelectionMgr.h>
51 #include <GEOMImpl_Types.hxx>
53 #include <SALOME_ListIteratorOfListIO.hxx>
54 #include <SALOME_Prs.h>
56 #include "utilities.h"
59 #include <qapplication.h>
63 #include <TCollection_AsciiString.hxx>
67 typedef QMap<QString, QString> FilterMap;
69 //=======================================================================
70 // function : getFileName
71 // purpose : Selection of a file name for Import/Export. Returns also
72 // the selected file type code through <filter> argument.
73 //=======================================================================
74 static QString getFileName( QWidget* parent,
75 const QString& initial,
76 const FilterMap& filterMap,
77 const QStringList filters,
78 const QString& caption,
82 static QString lastUsedFilter;
83 //QStringList filters;
85 for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) {
86 //filters.push_back( it.key() );
88 if (it.key().contains("BREP", false)) {
89 aBrepFilter = it.key();
93 SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, true, true );
94 if ( !caption.isEmpty() )
95 fd->setCaption( caption );
97 if ( !initial.isEmpty() )
98 fd->setSelection( initial );
100 fd->setFilters( filters );
102 if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) )
103 fd->setSelectedFilter( lastUsedFilter );
105 if (!aBrepFilter.isEmpty()) {
106 fd->setSelectedFilter(aBrepFilter);
111 QString filename = fd->selectedFile();
112 format = filterMap[fd->selectedFilter()];
113 lastUsedFilter = fd->selectedFilter();
115 qApp->processEvents();
119 //=======================================================================
120 // function : GEOMToolsGUI()
121 // purpose : Constructor
122 //=======================================================================
123 GEOMToolsGUI::GEOMToolsGUI( GeometryGUI* parent )
129 //=======================================================================
130 // function : ~GEOMToolsGUI()
131 // purpose : Destructor
132 //=======================================================================
133 GEOMToolsGUI::~GEOMToolsGUI()
138 //=======================================================================
139 // function : OnGUIEvent()
141 //=======================================================================
142 bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
144 getGeometryGUI()->EmitSignalDeactivateDialog();
146 switch (theCommandID)
158 case 111: // IMPORT BREP
159 case 112: // IMPORT IGES
160 case 113: // IMPORT STEP
165 case 121: // EXPORT BREP
166 case 122: // EXPORT IGES
167 case 123: // EXPORT STEP
172 case 2171: // POPUP VIEWER - SELECT ONLY - VERTEX
174 OnSelectOnly( GEOM_POINT );
177 case 2172: // POPUP VIEWER - SELECT ONLY - EDGE
179 OnSelectOnly( GEOM_EDGE );
182 case 2173: // POPUP VIEWER - SELECT ONLY - WIRE
184 OnSelectOnly( GEOM_WIRE );
187 case 2174: // POPUP VIEWER - SELECT ONLY - FACE
189 OnSelectOnly( GEOM_FACE );
192 case 2175: // POPUP VIEWER - SELECT ONLY - SHELL
194 OnSelectOnly( GEOM_SHELL );
197 case 2176: // POPUP VIEWER - SELECT ONLY - SOLID
199 OnSelectOnly( GEOM_SOLID );
202 case 2177: // POPUP VIEWER - SELECT ONLY - COMPOUND
204 OnSelectOnly( GEOM_COMPOUND );
207 case 2178: // POPUP VIEWER - SELECT ONLY - SELECT ALL
209 OnSelectOnly( GEOM_ALLOBJECTS );
212 case 411: // SETTINGS - ADD IN STUDY
214 // SAN -- TO BE REMOVED !!!
217 case 412: // SETTINGS - SHADING COLOR
222 case 413: // SETTINGS - ISOS
227 case 414: // SETTINGS : STEP VALUE FOR SPIN BOXES
232 case 804: // ADD IN STUDY - POPUP VIEWER
234 // SAN -- TO BE REMOVED !!!!
242 case 5103: // CHECK GEOMETRY
247 case 8032: // COLOR - POPUP VIEWER
252 case 8033: // TRANSPARENCY - POPUP VIEWER
257 case 8034: // ISOS - POPUP VIEWER
262 case 8035: // AUTO COLOR - POPUP VIEWER
267 case 8036: // DISABLE AUTO COLOR - POPUP VIEWER
269 OnDisableAutoColor();
272 case 9024 : // OPEN - OBJBROSER POPUP
279 SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
288 //===============================================================================
289 // function : OnEditDelete()
291 //===============================================================================
292 void GEOMToolsGUI::OnEditDelete()
294 SALOME_ListIO selected;
295 SalomeApp_Application* app =
296 dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
298 LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
299 SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
300 if ( aSelMgr && appStudy ) {
301 aSelMgr->selectedObjects( selected, QString::null, false );
302 if ( !selected.IsEmpty() ) {
303 _PTR(Study) aStudy = appStudy->studyDS();
305 bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
307 SUIT_MessageBox::warn1 ( app->desktop(),
308 QObject::tr("WRN_WARNING"),
309 QObject::tr("WRN_STUDY_LOCKED"),
310 QObject::tr("BUT_OK") );
314 // VSR 17/11/04: check if all objects selected belong to GEOM component --> start
315 // modifications of ASV 01.06.05
316 QString parentComp = getParentComponent( aStudy, selected );
317 CORBA::String_var geomIOR = app->orb()->object_to_string( GeometryGUI::GetGeomGen() );
318 QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR.in() ) );
320 if ( parentComp != geomComp ) {
321 SUIT_MessageBox::warn1 ( app->desktop(),
322 QObject::tr("ERR_ERROR"),
323 QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ),
324 QObject::tr("BUT_OK") );
327 // VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish
330 //Get Main Objects Names
331 Handle(SALOME_InteractiveObject) anIObject;
332 for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() )
334 QString aName = It.Value()->getName();
335 if ( aName != "" && aName.ref(0) != '*') {
336 aNameList.append(" - " + aName + "\n");
339 anIObject = It.Value();
341 // Append Child Names of Last Selected Object
342 _PTR(SObject) obj ( aStudy->FindObjectID( anIObject->getEntry() ) );
343 for (_PTR(ChildIterator) iit (aStudy->NewChildIterator(obj)); iit->More(); iit->Next()) {
344 _PTR(SObject) child (iit->Value());
345 QString aName = child->GetName();
346 if (aName != "" && aName.ref(0) != '*') {
347 aNameList.append(" - " + aName + "\n");
349 //append childs child
350 for (_PTR(ChildIterator) iitt(aStudy->NewChildIterator(child)); iitt->More(); iitt->Next()) {
351 _PTR(SObject) childchild(iitt->Value());
352 QString aName = childchild->GetName();
353 if (aName != "" && aName.ref(0) != '*') {
354 aNameList.append(" - " + aName + "\n");
356 for (_PTR(ChildIterator) itt(aStudy->NewChildIterator(childchild)); itt->More(); itt->Next())
358 _PTR(SObject) childs(itt->Value());
359 QString aName = childs->GetName();
360 if (aName != "" && aName.ref(0) != '*') {
361 aNameList.append(" - " + aName + "\n");
368 } //end of child append
370 GEOMBase_aWarningDlg* Dialog = new GEOMBase_aWarningDlg( app->desktop(), QObject::tr( "GEOM_WRN_WARNING" ), aNameList, nbSel);
371 int r = Dialog->exec();
376 // QAD_Operation* op = new SALOMEGUI_ImportOperation(.....);
379 // prepare list of SALOME_Views
380 QPtrList<SALOME_View> views;
383 ViewManagerList vmans = app->viewManagers();
384 SUIT_ViewManager* vman;
385 for ( vman = vmans.first(); vman; vman = vmans.next() ) {
386 SUIT_ViewModel* vmod = vman->getViewModel();
387 view = dynamic_cast<SALOME_View*> ( vmod ); // must work for OCC and VTK views
389 views.append( view );
392 _PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
393 _PTR(GenericAttribute) anAttr;
394 GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
396 _PTR(SComponent) aGeom ( aStudy->FindComponent("GEOM") );
400 // MAIN LOOP OF SELECTED OBJECTS
401 for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
403 Handle(SALOME_InteractiveObject) io = It.Value();
404 if ( !io->hasEntry() )
407 _PTR(SObject) obj ( aStudy->FindObjectID( io->getEntry() ) );
409 // disable removal of "Geometry" component object
410 if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) )
413 //If the object has been used to create another one,then it can't be deleted
414 _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeom));
415 for ( it->InitEx( true ); it->More(); it->Next() ) {
416 _PTR(SObject) chobj (it->Value());
417 if(CheckSubObjectInUse(chobj, obj, aStudy)) return;
419 for (_PTR(ChildIterator) it (aStudy->NewChildIterator(obj)); it->More(); it->Next()) {
420 _PTR(SObject) child (it->Value());
421 if(CheckSubObjectInUse( chobj, child, aStudy)) return;
425 RemoveObjectWithChildren(obj, aStudy, views, disp);
427 // Remove objects from Study
428 aStudyBuilder->RemoveObject( obj );
431 } // MAIN LOOP of selected
434 aSelMgr->setSelectedObjects( selected );
435 getGeometryGUI()->updateObjBrowser();
436 } // if ( selected not empty )
437 } // if ( selMgr && appStudy )
439 app->updateActions(); //SRN: To update a Save button in the toolbar
451 //==============================================================================
452 // function : OnEditCopy()
454 //==============================================================================
455 void GEOMToolsGUI::OnEditCopy()
458 SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection() );
459 GEOM::string_array_var listIOR = new GEOM::string_array;
461 const SALOME_ListIO& List = Sel->StoredIObjects();
463 myGeomBase->ConvertListOfIOInListOfIOR(List, listIOR);
465 Sel->ClearIObjects();
467 SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
468 int aStudyID = aStudy->StudyId();
470 for (unsigned int ind = 0; ind < listIOR->length();ind++) {
471 GEOM::GEOM_Object_var aShapeInit = myGeom->GetIORFromString(listIOR[ind]);
473 GEOM::GEOM_IInsertOperations_var IOp = myGeom->GetIInsertOperations(aStudyID);
474 GEOM::GEOM_Object_var result = IOp->MakeCopy(aShapeInit);
475 myGeomBase->Display(result);
477 catch (const SALOME::SALOME_Exception& S_ex) {
478 QtCatchCorbaException(S_ex);
482 QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY"));
487 //=====================================================================================
489 // purpose : BRep, Iges, Step
490 //=====================================================================================
491 bool GEOMToolsGUI::Import()
493 SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( getGeometryGUI()->getApp() );
494 //SUIT_Application* app = getGeometryGUI()->getApp();
495 if (! app) return false;
497 SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
499 cout << "FAILED to cast active study to SalomeApp_Study" << endl;
502 _PTR(Study) aStudy = stud->studyDS();
504 bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
506 SUIT_MessageBox::warn1 ( app->desktop(),
507 QObject::tr("WRN_WARNING"),
508 QObject::tr("WRN_STUDY_LOCKED"),
509 QObject::tr("BUT_OK") );
513 GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
514 if ( CORBA::is_nil( eng ) ) {
515 SUIT_MessageBox::error1( app->desktop(),
516 QObject::tr("WRN_WARNING"),
517 QObject::tr( "GEOM Engine is not started" ),
518 QObject::tr("BUT_OK") );
522 GEOM::GEOM_IInsertOperations_var aInsOp = eng->GetIInsertOperations( aStudy->StudyId() );
523 if ( aInsOp->_is_nil() )
526 GEOM::GEOM_Object_var anObj;
528 // Obtain a list of available import formats
531 GEOM::string_array_var aFormats, aPatterns;
532 aInsOp->ImportTranslators( aFormats, aPatterns );
534 for ( int i = 0, n = aFormats->length(); i < n; i++ ) {
535 aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] );
536 filters.push_back( (char*)aPatterns[i] );
541 QString fileName = getFileName(app->desktop(), "", aMap, filters,
542 tr("GEOM_MEN_IMPORT"), true, fileType);
544 if (fileType.isEmpty() )
546 // Trying to detect file type
547 QFileInfo aFileInfo( fileName );
548 QString aPossibleType = (aFileInfo.extension(false)).upper() ;
550 if ( (aMap.values()).contains(aPossibleType) )
551 fileType = aPossibleType;
554 if (fileName.isEmpty() || fileType.isEmpty())
557 GEOM_Operation* anOp = new GEOM_Operation (app, aInsOp.in());
559 SUIT_OverrideCursor wc;
561 app->putInfo(tr("GEOM_PRP_LOADING").arg(SUIT_Tools::file(fileName, /*withExten=*/true)));
565 CORBA::String_var fileN = fileName.latin1();
566 CORBA::String_var fileT = fileType.latin1();
567 anObj = aInsOp->Import(fileN, fileT);
569 if ( !anObj->_is_nil() && aInsOp->IsDone() ) {
570 QString aPublishObjName =
571 GEOMBase::GetDefaultName(SUIT_Tools::file(fileName, /*withExten=*/true));
573 SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy(aStudy);
574 GeometryGUI::GetGeomGen()->PublishInStudy(aDSStudy,
575 SALOMEDS::SObject::_nil(),
579 GEOM_Displayer( stud ).Display( anObj.in() );
581 // update data model and object browser
582 getGeometryGUI()->updateObjBrowser( true );
589 SUIT_MessageBox::error1( app->desktop(),
590 QObject::tr( "GEOM_ERROR" ),
591 QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
592 QObject::tr("BUT_OK") );
595 catch( const SALOME::SALOME_Exception& S_ex ) {
596 //QtCatchCorbaException(S_ex);
601 app->updateActions(); //SRN: To update a Save button in the toolbar
607 //=====================================================================================
609 // purpose : BRep, Iges, Step
610 //=====================================================================================
611 bool GEOMToolsGUI::Export()
613 SalomeApp_Application* app = getGeometryGUI()->getApp();
614 if (!app) return false;
616 SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
618 cout << "FAILED to cast active study to SalomeApp_Study" << endl;
621 _PTR(Study) aStudy = stud->studyDS();
623 GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
624 if ( CORBA::is_nil( eng ) ) {
625 SUIT_MessageBox::error1( app->desktop(),
626 QObject::tr("WRN_WARNING"),
627 QObject::tr( "GEOM Engine is not started" ),
628 QObject::tr("BUT_OK") );
632 GEOM::GEOM_IInsertOperations_var aInsOp = eng->GetIInsertOperations( aStudy->StudyId() );
633 if ( aInsOp->_is_nil() )
636 // Obtain a list of available export formats
639 GEOM::string_array_var aFormats, aPatterns;
640 aInsOp->ExportTranslators( aFormats, aPatterns );
641 for ( int i = 0, n = aFormats->length(); i < n; i++ ) {
642 aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] );
643 filters.push_back( (char*)aPatterns[i] );
646 // Get selected objects
647 LightApp_SelectionMgr* sm = app->selectionMgr();
651 SALOME_ListIO selectedObjects;
652 sm->selectedObjects( selectedObjects );
654 SALOME_ListIteratorOfListIO It( selectedObjects );
655 for(;It.More();It.Next()) {
656 Handle(SALOME_InteractiveObject) IObject = It.Value();
657 Standard_Boolean found;
658 GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject(IObject, found);
660 if ( !found || anObj->_is_nil() )
664 QString file = getFileName(app->desktop(), QString( IObject->getName() ), aMap, filters,
665 tr("GEOM_MEN_EXPORT"), false, fileType);
667 // User has pressed "Cancel" --> stop the operation
668 if ( file.isEmpty() || fileType.isEmpty() )
671 GEOM_Operation* anOp = new GEOM_Operation( app, aInsOp.in() );
673 SUIT_OverrideCursor wc;
675 app->putInfo( tr("GEOM_PRP_EXPORT").arg(SUIT_Tools::file( file, /*withExten=*/true )) );
680 aInsOp->Export( anObj, file, fileType.latin1() );
682 if ( aInsOp->IsDone() )
688 SUIT_MessageBox::error1( app->desktop(),
689 QObject::tr( "GEOM_ERROR" ),
690 QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
691 QObject::tr("BUT_OK") );
695 catch (const SALOME::SALOME_Exception& S_ex) {
696 //QtCatchCorbaException(S_ex);
706 QString GEOMToolsGUI::getParentComponent( _PTR( Study ) study, const SALOME_ListIO& iobjs )
710 for ( SALOME_ListIteratorOfListIO it( iobjs ); it.More(); it.Next() ) {
712 Handle(SALOME_InteractiveObject) io = it.Value();
713 if ( !io->hasEntry() )
716 QString compName = getParentComponent( study->FindObjectID( io->getEntry() ) );
718 if ( parentComp.isNull() )
719 parentComp = compName;
720 else if ( parentComp.compare( compName) != 0 ) { // objects belonging to different components are selected
721 parentComp = QString::null;
729 QString GEOMToolsGUI::getParentComponent( _PTR( SObject ) obj )
732 _PTR(SComponent) comp = obj->GetFatherComponent();
734 _PTR(GenericAttribute) anAttr;
735 if ( comp->FindAttribute( anAttr, "AttributeName") ) {
736 _PTR(AttributeName) aName( anAttr );
737 return QString( aName->Value().c_str() );
744 //=====================================================================================
745 // function : RemoveObjectWithChildren
746 // purpose : to be used by OnEditDelete() method
747 //=====================================================================================
748 void GEOMToolsGUI::RemoveObjectWithChildren(_PTR(SObject) obj,
750 QPtrList<SALOME_View> views,
751 GEOM_Displayer* disp)
753 // iterate through all children of obj
754 for (_PTR(ChildIterator) it (aStudy->NewChildIterator(obj)); it->More(); it->Next()) {
755 _PTR(SObject) child (it->Value());
756 RemoveObjectWithChildren(child, aStudy, views, disp);
759 // erase object and remove it from engine
760 _PTR(GenericAttribute) anAttr;
761 if (obj->FindAttribute(anAttr, "AttributeIOR")) {
762 _PTR(AttributeIOR) anIOR (anAttr);
764 // Delete shape in Client
765 const TCollection_AsciiString ASCIor ((char*)anIOR->Value().c_str());
766 getGeometryGUI()->GetShapeReader().RemoveShapeFromBuffer(ASCIor);
768 CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(obj);
769 GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
770 if (!CORBA::is_nil(geomObj)) {
771 // Erase graphical object
772 SALOME_View* view = views.first();
773 for (; view; view = views.next()) {
774 disp->Erase(geomObj, true, view);
777 // Remove object from Engine
778 GeometryGUI::GetGeomGen()->RemoveObject( geomObj );
783 //=====================================================================================
784 // function : CheckSubObjectInUse
785 // purpose : to be used by OnEditDelete() method
786 //=====================================================================================
787 bool GEOMToolsGUI::CheckSubObjectInUse(_PTR(SObject) checkobj,
788 _PTR(SObject) remobj,
791 CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(checkobj);
792 GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
793 if( CORBA::is_nil(geomObj) )
796 GEOM::ListOfGO_var list = geomObj->GetDependency();
797 if( list->length() > 1 )
798 for(int i = 0; i < list->length(); i++ ){
799 CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject(remobj);
800 GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem );
801 if( list[i]->_is_equivalent( geomObj_rem ) ){
802 SalomeApp_Application* app =
803 dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
805 SUIT_MessageBox::warn1 ( app->desktop(),
806 QObject::tr("WRN_WARNING"),
807 QObject::tr("DEP_OBJECT"),
808 QObject::tr("BUT_OK") );
816 //=================================================================================
817 // function : deactivate()
818 // purpose : Called when GEOM component is deactivated
819 //=================================================================================
820 void GEOMToolsGUI::deactivate()
822 SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
824 SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
825 GEOM_Displayer aDisp (appStudy);
826 aDisp.GlobalSelection();
827 getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
831 //=====================================================================================
833 //=====================================================================================
837 GEOMGUI* GetLibGUI( GeometryGUI* parent )
839 return new GEOMToolsGUI( parent );