From fed7591cd7c593f495c2d6c076acec6273e89523 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 25 Mar 2011 15:23:53 +0000 Subject: [PATCH] Issue 0021055: EDF 1602 STUDY: Object browser reactualisation when creating an object --- src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx | 1 + src/BasicGUI/BasicGUI_ArcDlg.cxx | 1 + src/BasicGUI/BasicGUI_CircleDlg.cxx | 1 + src/BasicGUI/BasicGUI_CurveDlg.cxx | 1 + src/BasicGUI/BasicGUI_EllipseDlg.cxx | 1 + src/BasicGUI/BasicGUI_LineDlg.cxx | 1 + src/BasicGUI/BasicGUI_MarkerDlg.cxx | 1 + src/BasicGUI/BasicGUI_PlaneDlg.cxx | 1 + src/BasicGUI/BasicGUI_PointDlg.cxx | 1 + src/BasicGUI/BasicGUI_VectorDlg.cxx | 1 + src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx | 1 + src/BlocksGUI/BlocksGUI_BlockDlg.cxx | 1 + src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 1 + src/BlocksGUI/BlocksGUI_PropagateDlg.cxx | 1 + src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx | 1 + src/BlocksGUI/BlocksGUI_TrsfDlg.cxx | 1 + src/BooleanGUI/BooleanGUI_Dialog.cxx | 1 + src/BuildGUI/BuildGUI_CompoundDlg.cxx | 1 + src/BuildGUI/BuildGUI_EdgeDlg.cxx | 1 + src/BuildGUI/BuildGUI_FaceDlg.cxx | 1 + src/BuildGUI/BuildGUI_ShellDlg.cxx | 1 + src/BuildGUI/BuildGUI_SolidDlg.cxx | 1 + src/BuildGUI/BuildGUI_WireDlg.cxx | 1 + src/EntityGUI/EntityGUI_SubShapeDlg.cxx | 3 + src/GEOMBase/GEOMBase_Helper.cxx | 66 +++++++++++++++++-- src/GEOMBase/GEOMBase_Helper.h | 10 ++- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 16 +++-- .../GenerationGUI_FillingDlg.cxx | 1 + src/GenerationGUI/GenerationGUI_PipeDlg.cxx | 1 + src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 1 + src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 1 + src/GroupGUI/GroupGUI_GroupDlg.cxx | 1 + .../OperationGUI_ArchimedeDlg.cxx | 1 + src/OperationGUI/OperationGUI_ChamferDlg.cxx | 1 + src/OperationGUI/OperationGUI_ClippingDlg.cxx | 1 + .../OperationGUI_Fillet1d2dDlg.cxx | 1 + src/OperationGUI/OperationGUI_FilletDlg.cxx | 1 + .../OperationGUI_GetShapesOnShapeDlg.cxx | 1 + .../OperationGUI_GetSharedShapesDlg.cxx | 1 + .../OperationGUI_PartitionDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx | 1 + src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx | 1 + .../RepairGUI_ChangeOrientationDlg.cxx | 1 + src/RepairGUI/RepairGUI_CloseContourDlg.cxx | 1 + src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx | 1 + src/RepairGUI/RepairGUI_GlueDlg.cxx | 1 + src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx | 1 + .../RepairGUI_RemoveExtraEdgesDlg.cxx | 1 + src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx | 1 + src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx | 1 + src/RepairGUI/RepairGUI_SewingDlg.cxx | 1 + src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx | 1 + src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx | 1 + .../TransformationGUI_MirrorDlg.cxx | 8 +-- .../TransformationGUI_MultiRotationDlg.cxx | 1 + .../TransformationGUI_MultiTranslationDlg.cxx | 1 + .../TransformationGUI_OffsetDlg.cxx | 1 + .../TransformationGUI_PositionDlg.cxx | 8 +-- .../TransformationGUI_RotationDlg.cxx | 8 +-- .../TransformationGUI_ScaleDlg.cxx | 8 +-- .../TransformationGUI_TranslationDlg.cxx | 8 +-- 66 files changed, 155 insertions(+), 37 deletions(-) diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index 122f7aebe..20dc02312 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -570,6 +570,7 @@ void AdvancedGUI_PipeTShapeDlg::SetDoubleSpinBoxStep(double step) { // purpose : //================================================================================= void AdvancedGUI_PipeTShapeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index 48be784b5..43e776756 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -204,6 +204,7 @@ void BasicGUI_ArcDlg::Init() //================================================================================= void BasicGUI_ArcDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 9ca955c71..a3ff226a0 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -298,6 +298,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BasicGUI_CircleDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 0b0fb67a8..d7af0b9b0 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -208,6 +208,7 @@ void BasicGUI_CurveDlg::CheckButtonToggled() //================================================================================= void BasicGUI_CurveDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 464a02a73..c1895da94 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -179,6 +179,7 @@ void BasicGUI_EllipseDlg::SetDoubleSpinBoxStep( double step ) //================================================================================= void BasicGUI_EllipseDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index fd63aa81a..04db82bc5 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -156,6 +156,7 @@ void BasicGUI_LineDlg::Init() //================================================================================= void BasicGUI_LineDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index 57115a86a..aa7650d04 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -301,6 +301,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BasicGUI_MarkerDlg::onOk() { + setIsApplyAndClose( true ); if ( onApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 3fb367fc6..fbbceba9c 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -387,6 +387,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BasicGUI_PlaneDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 8e0be7963..2b364705c 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -449,6 +449,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) //================================================================================= void BasicGUI_PointDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( onAccept() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index b011ae1e1..9b3af6710 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -240,6 +240,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BasicGUI_VectorDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index 08c9925b7..387d78424 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -264,6 +264,7 @@ void BasicGUI_WorkingPlaneDlg::GroupClicked( int groupId ) //================================================================================= void BasicGUI_WorkingPlaneDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx index 43c351dca..a5dffa228 100644 --- a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx @@ -208,6 +208,7 @@ void BlocksGUI_BlockDlg::ConstructorsClicked (int constructorId) //================================================================================= void BlocksGUI_BlockDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index b58524ac6..0565ef730 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -163,6 +163,7 @@ void BlocksGUI_ExplodeDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BlocksGUI_ExplodeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx index dff963899..5743cc473 100644 --- a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx @@ -117,6 +117,7 @@ void BlocksGUI_PropagateDlg::Init() //================================================================================= void BlocksGUI_PropagateDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx index 40e47c62e..8da7a6e8b 100644 --- a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx @@ -193,6 +193,7 @@ void BlocksGUI_QuadFaceDlg::ConstructorsClicked (int constructorId) //================================================================================= void BlocksGUI_QuadFaceDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index 0b9547a11..6260d5fdf 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -195,6 +195,7 @@ void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId) //================================================================================= void BlocksGUI_TrsfDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index 5ccde57fd..a1001e7d6 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -169,6 +169,7 @@ void BooleanGUI_Dialog::Init() //================================================================================= void BooleanGUI_Dialog::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index 431c4317f..f821509e2 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -124,6 +124,7 @@ void BuildGUI_CompoundDlg::Init() //================================================================================= void BuildGUI_CompoundDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index 72aa73a6b..5e332f957 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -154,6 +154,7 @@ void BuildGUI_EdgeDlg::Init() //================================================================================= void BuildGUI_EdgeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index 09d682fe2..b1ad76c15 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -127,6 +127,7 @@ void BuildGUI_FaceDlg::Init() //================================================================================= void BuildGUI_FaceDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index 1a6b23f43..d49307975 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -132,6 +132,7 @@ void BuildGUI_ShellDlg::Init() //================================================================================= void BuildGUI_ShellDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index 5c6ffb670..c619ee15b 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -127,6 +127,7 @@ void BuildGUI_SolidDlg::Init() //================================================================================= void BuildGUI_SolidDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/BuildGUI/BuildGUI_WireDlg.cxx b/src/BuildGUI/BuildGUI_WireDlg.cxx index bb161e4bc..9a4d44a41 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.cxx +++ b/src/BuildGUI/BuildGUI_WireDlg.cxx @@ -147,6 +147,7 @@ void BuildGUI_WireDlg::Init() //================================================================================= void BuildGUI_WireDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 9122a7d74..c8fe70499 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -83,6 +83,8 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidg layout->addWidget( GroupPoints ); /***************************************************************/ + setIsOptimizedBrowsing( true ); + setHelpFileName( "create_explode_page.html" ); mainFrame()->GroupBoxName->hide(); @@ -154,6 +156,7 @@ void EntityGUI_SubShapeDlg::Init() //================================================================================= void EntityGUI_SubShapeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 07e96b59d..0efbf7239 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -87,7 +87,8 @@ GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine() // Purpose : //================================================================ GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop ) - : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ) + : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ), + myIsApplyAndClose( false ), myIsOptimizedBrowsing( false ) { } @@ -523,14 +524,14 @@ void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, // Function : addInStudy // Purpose : Add object in study //================================================================ -void GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theName ) +QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theName ) { if ( !hasCommand() ) - return; + return QString(); _PTR(Study) aStudy = getStudy()->studyDS(); if ( !aStudy || theObj->_is_nil() ) - return; + return QString(); SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy); @@ -539,10 +540,16 @@ void GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theN SALOMEDS::SObject_var aSO = getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj); + QString anEntry; + if ( !aSO->_is_nil() ) + anEntry = aSO->GetID(); + // Each dialog is responsible for this method implementation, // default implementation does nothing restoreSubShapes(aStudyDS, aSO); aSO->UnRegister(); + + return anEntry; } //================================================================ @@ -824,6 +831,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) else { addSubshapesToStudy(); // add Subshapes if local selection const int nbObjs = objects.size(); + QStringList anEntryList; int aNumber = 1; for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { GEOM::GEOM_Object_var obj=*it; @@ -844,7 +852,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) if ( aName.isEmpty() ) aName = GEOMBase::GetDefaultName( getPrefix( obj ) ); } - addInStudy( obj, aName.toLatin1().constData() ); + anEntryList << addInStudy( obj, aName.toLatin1().constData() ); // updateView=false display( obj, false ); #ifdef WITHGENERICOBJ @@ -866,7 +874,11 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) if ( nbObjs ) { commitCommand(); updateObjBrowser(); - SUIT_Session::session()->activeApplication()->putInfo( QObject::tr("GEOM_PRP_DONE") ); + if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) { + if( LightApp_Application* aLightApp = dynamic_cast( anApp ) ) + aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() ); + anApp->putInfo( QObject::tr("GEOM_PRP_DONE") ); + } result = true; } else @@ -1293,3 +1305,45 @@ QList GEOMBase_Helper::getSelected( const QList objsForDisplay; - + QStringList anEntryList; + // iterate through all selected files SUIT_MessageBox::StandardButton igesAnswer = SUIT_MessageBox::NoButton; @@ -688,10 +689,12 @@ bool GEOMToolsGUI::Import() GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, /*withExten=*/true ) ); SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy ); - GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy, - SALOMEDS::SObject::_nil(), - anObj, - aPublishObjName.toLatin1().constData() ); + SALOMEDS::SObject_var aSO = GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy, + SALOMEDS::SObject::_nil(), + anObj, + aPublishObjName.toLatin1().constData() ); + if( ( !aSO->_is_nil() ) ) + anEntryList.append( aSO->GetID() ); objsForDisplay.append( anObj ); @@ -716,6 +719,9 @@ bool GEOMToolsGUI::Import() // update object browser getGeometryGUI()->updateObjBrowser( true ); + // browse published objects + app->browseObjects( anEntryList ); + // display imported model (if only one file is selected) if ( objsForDisplay.count() == 1 ) GEOM_Displayer( stud ).Display( objsForDisplay[0].in() ); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 66f132050..f640715e8 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -172,6 +172,7 @@ void GenerationGUI_FillingDlg::SetDoubleSpinBoxStep( double step ) //================================================================================= void GenerationGUI_FillingDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index e8cee7957..e59717ec0 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -206,6 +206,7 @@ void GenerationGUI_PipeDlg::SelectionTypeButtonClicked() //================================================================================= void GenerationGUI_PipeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index db3db9acd..6932c215f 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -301,6 +301,7 @@ void GenerationGUI_PrismDlg::ConstructorsClicked (int constructorId) //================================================================================= void GenerationGUI_PrismDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index d92ab0d5f..32e2d4c16 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -160,6 +160,7 @@ void GenerationGUI_RevolDlg::SetDoubleSpinBoxStep (double step) //================================================================================= void GenerationGUI_RevolDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 9fb10fccc..fc31bb34c 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -287,6 +287,7 @@ void GroupGUI_GroupDlg::closeEvent(QCloseEvent* e) //================================================================================= void GroupGUI_GroupDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index 9ba48d135..54ac03809 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -161,6 +161,7 @@ void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step ) //================================================================================= void OperationGUI_ArchimedeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index 2b6a1a1f5..9b8cf72c1 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -370,6 +370,7 @@ void OperationGUI_ChamferDlg::ConstructorsClicked (int constructorId) //================================================================================= void OperationGUI_ChamferDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx index 18e02c2b4..16e089bb6 100644 --- a/src/OperationGUI/OperationGUI_ClippingDlg.cxx +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -249,6 +249,7 @@ bool OperationGUI_ClippingDlg::ClickOnApply() //================================================================================= void OperationGUI_ClippingDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx index f9407e815..c7295e95d 100644 --- a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx +++ b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx @@ -149,6 +149,7 @@ void OperationGUI_Fillet1d2dDlg::Init() //================================================================================= void OperationGUI_Fillet1d2dDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 8a464ef4e..84ea1c08a 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -308,6 +308,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId) //================================================================================= void OperationGUI_FilletDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx index b5637bd97..e9e7f4cb3 100644 --- a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx @@ -153,6 +153,7 @@ void OperationGUI_GetShapesOnShapeDlg::Init() //================================================================================= void OperationGUI_GetShapesOnShapeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx b/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx index de210bd5d..b2fa7b6bf 100644 --- a/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx +++ b/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx @@ -171,6 +171,7 @@ void OperationGUI_GetSharedShapesDlg::ConstructorsClicked (int constructorId) //================================================================================= void OperationGUI_GetSharedShapesDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index fcf94afc6..8f3848b38 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -226,6 +226,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId ) //================================================================================= void OperationGUI_PartitionDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index e68df444a..96896cba2 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -203,6 +203,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId) //================================================================================= void PrimitiveGUI_BoxDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 6f145edb5..7ea6073f7 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -219,6 +219,7 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId) //================================================================================= void PrimitiveGUI_ConeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 22b3ceb62..a4e539119 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -211,6 +211,7 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId) //================================================================================= void PrimitiveGUI_CylinderDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx index 7f08ac073..b70f3c234 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx @@ -260,6 +260,7 @@ void PrimitiveGUI_DiskDlg::ConstructorsClicked (int constructorId) //================================================================================= void PrimitiveGUI_DiskDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index 88d10af04..452a2795a 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -244,6 +244,7 @@ void PrimitiveGUI_FaceDlg::TypeButtonClicked() //================================================================================= void PrimitiveGUI_FaceDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 84230fdc6..26d73ca76 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -204,6 +204,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId ) //================================================================================= void PrimitiveGUI_SphereDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 22f51aa04..dc6c4a582 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -209,6 +209,7 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId) //================================================================================= void PrimitiveGUI_TorusDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx b/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx index fd8c6be0c..a2e50f8af 100644 --- a/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx +++ b/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx @@ -128,6 +128,7 @@ void RepairGUI_ChangeOrientationDlg::Init() //================================================================================= void RepairGUI_ChangeOrientationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx index 565c9e561..07deccc97 100644 --- a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx +++ b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx @@ -143,6 +143,7 @@ void RepairGUI_CloseContourDlg::Init() //================================================================================= void RepairGUI_CloseContourDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx index 4e67a04b0..9c8c0b010 100644 --- a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -199,6 +199,7 @@ void RepairGUI_DivideEdgeDlg::displayPreview() //================================================================================= void RepairGUI_DivideEdgeDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 1dd8f39cd..d79190e23 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -252,6 +252,7 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId ) //================================================================================= void RepairGUI_GlueDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx index b3038b1ca..129b9d037 100644 --- a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx +++ b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx @@ -177,6 +177,7 @@ void RepairGUI_LimitToleranceDlg::ConstructorsClicked(int constructorId) //================================================================================= void RepairGUI_LimitToleranceDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx index 13d07ad43..67ff1087b 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -132,6 +132,7 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() //================================================================================= void RepairGUI_RemoveExtraEdgesDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx index 8c4335c29..4c9a25a82 100644 --- a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx @@ -144,6 +144,7 @@ void RepairGUI_RemoveHolesDlg::Init() //================================================================================= void RepairGUI_RemoveHolesDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx index 97807e449..6bfdbb1ff 100644 --- a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx @@ -132,6 +132,7 @@ void RepairGUI_RemoveIntWiresDlg::Init() //================================================================================= void RepairGUI_RemoveIntWiresDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index 1ce88ae29..85cff0500 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -147,6 +147,7 @@ void RepairGUI_SewingDlg::Init() //================================================================================= void RepairGUI_SewingDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx index 7d8449d33..2530da852 100755 --- a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -331,6 +331,7 @@ void RepairGUI_ShapeProcessDlg::init() //================================================================================= void RepairGUI_ShapeProcessDlg::onOk() { + setIsApplyAndClose( true ); if ( onApply() ) ClickOnCancel(); } diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index d68177af1..33b0c6712 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -138,6 +138,7 @@ void RepairGUI_SuppressFacesDlg::Init() //================================================================================= void RepairGUI_SuppressFacesDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 7911cc99e..986a2ab96 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -181,6 +181,7 @@ void TransformationGUI_MirrorDlg::ConstructorsClicked (int constructorId) //================================================================================= void TransformationGUI_MirrorDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } @@ -196,13 +197,10 @@ bool TransformationGUI_MirrorDlg::ClickOnApply() initName(); - myObjects.clear(); - myEditCurrentArgument = GroupPoints->LineEdit1; - myEditCurrentArgument->setText(""); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - // activate selection and connect selection manager ConstructorsClicked(getConstructorId()); + SelectionIntoArgument(); + return true; } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 11c78050c..c39ab687d 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -262,6 +262,7 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked (int constructorId) //================================================================================= void TransformationGUI_MultiRotationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index b98a86023..feae096d9 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -292,6 +292,7 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked (int constructor //================================================================================= void TransformationGUI_MultiTranslationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 5f7717806..7f9456ee2 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -142,6 +142,7 @@ void TransformationGUI_OffsetDlg::Init() //================================================================================= void TransformationGUI_OffsetDlg::ClickOnOk() { + setIsApplyAndClose( true ); if ( ClickOnApply() ) ClickOnCancel(); } diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index 65fa99e15..9c58fa8bd 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -283,6 +283,7 @@ void TransformationGUI_PositionDlg::ValueChangedInSpinBox() //================================================================================= void TransformationGUI_PositionDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } @@ -298,13 +299,10 @@ bool TransformationGUI_PositionDlg::ClickOnApply() initName(); - myObjects.clear(); - myEditCurrentArgument = Group1->LineEdit1; - myEditCurrentArgument->setText(""); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - // activate selection and connect selection manager ConstructorsClicked(getConstructorId()); + SelectionIntoArgument(); + return true; } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index b17cd3ecf..db8295515 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -225,6 +225,7 @@ void TransformationGUI_RotationDlg::ConstructorsClicked (int constructorId) //================================================================================= void TransformationGUI_RotationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } @@ -240,13 +241,10 @@ bool TransformationGUI_RotationDlg::ClickOnApply() initName(); - myObjects.clear(); - myEditCurrentArgument = GroupPoints->LineEdit1; - myEditCurrentArgument->setText(""); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - // activate selection and connect selection manager ConstructorsClicked(getConstructorId()); + SelectionIntoArgument(); + return true; } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 522435363..32263ff82 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -245,6 +245,7 @@ void TransformationGUI_ScaleDlg::ConstructorsClicked (int constructorId) //================================================================================= void TransformationGUI_ScaleDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } @@ -260,13 +261,10 @@ bool TransformationGUI_ScaleDlg::ClickOnApply() initName(tr("GEOM_SCALE")); - myObjects.clear(); - myEditCurrentArgument = LineEdit1; - myEditCurrentArgument->setText(""); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - // activate selection and connect selection manager ConstructorsClicked(getConstructorId()); + SelectionIntoArgument(); + return true; } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 61da5756b..01f643ca2 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -271,6 +271,7 @@ void TransformationGUI_TranslationDlg::ConstructorsClicked (int constructorId) //================================================================================= void TransformationGUI_TranslationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if (ClickOnApply()) ClickOnCancel(); } @@ -286,13 +287,10 @@ bool TransformationGUI_TranslationDlg::ClickOnApply() initName(); - myObjects.clear(); - myEditCurrentArgument = GroupPoints->LineEdit1; - myEditCurrentArgument->setText(""); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - // activate selection and connect selection manager ConstructorsClicked(getConstructorId()); + SelectionIntoArgument(); + return true; }