Issue 0021055: EDF 1602 STUDY: Object browser reactualisation when creating an object

This commit is contained in:
ouv 2011-03-25 15:23:53 +00:00
parent 760878adc9
commit fed7591cd7
66 changed files with 155 additions and 37 deletions

View File

@ -570,6 +570,7 @@ void AdvancedGUI_PipeTShapeDlg::SetDoubleSpinBoxStep(double step) {
// purpose :
//=================================================================================
void AdvancedGUI_PipeTShapeDlg::ClickOnOk() {
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -204,6 +204,7 @@ void BasicGUI_ArcDlg::Init()
//=================================================================================
void BasicGUI_ArcDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -298,6 +298,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void BasicGUI_CircleDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -208,6 +208,7 @@ void BasicGUI_CurveDlg::CheckButtonToggled()
//=================================================================================
void BasicGUI_CurveDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -179,6 +179,7 @@ void BasicGUI_EllipseDlg::SetDoubleSpinBoxStep( double step )
//=================================================================================
void BasicGUI_EllipseDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -156,6 +156,7 @@ void BasicGUI_LineDlg::Init()
//=================================================================================
void BasicGUI_LineDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -301,6 +301,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void BasicGUI_MarkerDlg::onOk()
{
setIsApplyAndClose( true );
if ( onApply() )
ClickOnCancel();
}

View File

@ -387,6 +387,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void BasicGUI_PlaneDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -449,6 +449,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
//=================================================================================
void BasicGUI_PointDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( onAccept() )
ClickOnCancel();
}

View File

@ -240,6 +240,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void BasicGUI_VectorDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -264,6 +264,7 @@ void BasicGUI_WorkingPlaneDlg::GroupClicked( int groupId )
//=================================================================================
void BasicGUI_WorkingPlaneDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -208,6 +208,7 @@ void BlocksGUI_BlockDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void BlocksGUI_BlockDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -163,6 +163,7 @@ void BlocksGUI_ExplodeDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void BlocksGUI_ExplodeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -117,6 +117,7 @@ void BlocksGUI_PropagateDlg::Init()
//=================================================================================
void BlocksGUI_PropagateDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -193,6 +193,7 @@ void BlocksGUI_QuadFaceDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void BlocksGUI_QuadFaceDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -195,6 +195,7 @@ void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void BlocksGUI_TrsfDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -169,6 +169,7 @@ void BooleanGUI_Dialog::Init()
//=================================================================================
void BooleanGUI_Dialog::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -124,6 +124,7 @@ void BuildGUI_CompoundDlg::Init()
//=================================================================================
void BuildGUI_CompoundDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -154,6 +154,7 @@ void BuildGUI_EdgeDlg::Init()
//=================================================================================
void BuildGUI_EdgeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -127,6 +127,7 @@ void BuildGUI_FaceDlg::Init()
//=================================================================================
void BuildGUI_FaceDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -132,6 +132,7 @@ void BuildGUI_ShellDlg::Init()
//=================================================================================
void BuildGUI_ShellDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -127,6 +127,7 @@ void BuildGUI_SolidDlg::Init()
//=================================================================================
void BuildGUI_SolidDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -147,6 +147,7 @@ void BuildGUI_WireDlg::Init()
//=================================================================================
void BuildGUI_WireDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -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();
}

View File

@ -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<LightApp_Application*>( anApp ) )
aLightApp->browseObjects( anEntryList, isApplyAndClose(), isOptimizedBrowsing() );
anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
}
result = true;
}
else
@ -1293,3 +1305,45 @@ QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEn
}
return result;
}
//================================================================
// Function : setIsApplyAndClose
// Purpose : Set value of the flag indicating that the dialog is
// accepted by Apply & Close button
//================================================================
void GEOMBase_Helper::setIsApplyAndClose( const bool theFlag )
{
myIsApplyAndClose = theFlag;
}
//================================================================
// Function : isApplyAndClose
// Purpose : Get value of the flag indicating that the dialog is
// accepted by Apply & Close button
//================================================================
bool GEOMBase_Helper::isApplyAndClose() const
{
return myIsApplyAndClose;
}
//================================================================
// Function : setIsOptimizedBrowsing
// Purpose : Set value of the flag switching to optimized
// browsing mode (to select the first published
// object only)
//================================================================
void GEOMBase_Helper::setIsOptimizedBrowsing( const bool theFlag )
{
myIsOptimizedBrowsing = theFlag;
}
//================================================================
// Function : isOptimizedBrowsing
// Purpose : Get value of the flag switching to optimized
// browsing mode (to select the first published
// object only)
//================================================================
bool GEOMBase_Helper::isOptimizedBrowsing() const
{
return myIsOptimizedBrowsing;
}

View File

@ -105,7 +105,7 @@ protected:
void prepareSelection( const ObjectList&, const int );
void prepareSelection( GEOM::GEOM_Object_ptr, const int );
void addInStudy ( GEOM::GEOM_Object_ptr, const char* theName );
QString addInStudy ( GEOM::GEOM_Object_ptr, const char* theName );
bool openCommand ();
bool abortCommand ();
@ -182,6 +182,12 @@ protected:
GEOM_Displayer* getDisplayer();
SUIT_Desktop* getDesktop() const;
virtual void setIsApplyAndClose( const bool theFlag );
virtual bool isApplyAndClose() const;
virtual void setIsOptimizedBrowsing( const bool theFlag );
virtual bool isOptimizedBrowsing() const;
private:
QString getEntry( GEOM::GEOM_Object_ptr ) const;
void clearShapeBuffer( GEOM::GEOM_Object_ptr );
@ -198,6 +204,8 @@ private:
bool isPreview;
SALOME_ListIO mySelected;
SUIT_Desktop* myDesktop;
bool myIsApplyAndClose;
bool myIsOptimizedBrowsing;
};

View File

@ -587,6 +587,7 @@ bool GEOMToolsGUI::Import()
QList< GEOM::GEOM_Object_var > objsForDisplay;
QStringList anEntryList;
// iterate through all selected files
@ -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() );

View File

@ -172,6 +172,7 @@ void GenerationGUI_FillingDlg::SetDoubleSpinBoxStep( double step )
//=================================================================================
void GenerationGUI_FillingDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -206,6 +206,7 @@ void GenerationGUI_PipeDlg::SelectionTypeButtonClicked()
//=================================================================================
void GenerationGUI_PipeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -301,6 +301,7 @@ void GenerationGUI_PrismDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void GenerationGUI_PrismDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -160,6 +160,7 @@ void GenerationGUI_RevolDlg::SetDoubleSpinBoxStep (double step)
//=================================================================================
void GenerationGUI_RevolDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -287,6 +287,7 @@ void GroupGUI_GroupDlg::closeEvent(QCloseEvent* e)
//=================================================================================
void GroupGUI_GroupDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -161,6 +161,7 @@ void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step )
//=================================================================================
void OperationGUI_ArchimedeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -370,6 +370,7 @@ void OperationGUI_ChamferDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void OperationGUI_ChamferDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -249,6 +249,7 @@ bool OperationGUI_ClippingDlg::ClickOnApply()
//=================================================================================
void OperationGUI_ClippingDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -149,6 +149,7 @@ void OperationGUI_Fillet1d2dDlg::Init()
//=================================================================================
void OperationGUI_Fillet1d2dDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -308,6 +308,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void OperationGUI_FilletDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -153,6 +153,7 @@ void OperationGUI_GetShapesOnShapeDlg::Init()
//=================================================================================
void OperationGUI_GetShapesOnShapeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -171,6 +171,7 @@ void OperationGUI_GetSharedShapesDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void OperationGUI_GetSharedShapesDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -226,6 +226,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void OperationGUI_PartitionDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -203,6 +203,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void PrimitiveGUI_BoxDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -219,6 +219,7 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void PrimitiveGUI_ConeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -211,6 +211,7 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void PrimitiveGUI_CylinderDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -260,6 +260,7 @@ void PrimitiveGUI_DiskDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void PrimitiveGUI_DiskDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -244,6 +244,7 @@ void PrimitiveGUI_FaceDlg::TypeButtonClicked()
//=================================================================================
void PrimitiveGUI_FaceDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -204,6 +204,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void PrimitiveGUI_SphereDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -209,6 +209,7 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void PrimitiveGUI_TorusDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -128,6 +128,7 @@ void RepairGUI_ChangeOrientationDlg::Init()
//=================================================================================
void RepairGUI_ChangeOrientationDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -143,6 +143,7 @@ void RepairGUI_CloseContourDlg::Init()
//=================================================================================
void RepairGUI_CloseContourDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -199,6 +199,7 @@ void RepairGUI_DivideEdgeDlg::displayPreview()
//=================================================================================
void RepairGUI_DivideEdgeDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -252,6 +252,7 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId )
//=================================================================================
void RepairGUI_GlueDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -177,6 +177,7 @@ void RepairGUI_LimitToleranceDlg::ConstructorsClicked(int constructorId)
//=================================================================================
void RepairGUI_LimitToleranceDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -132,6 +132,7 @@ void RepairGUI_RemoveExtraEdgesDlg::Init()
//=================================================================================
void RepairGUI_RemoveExtraEdgesDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -144,6 +144,7 @@ void RepairGUI_RemoveHolesDlg::Init()
//=================================================================================
void RepairGUI_RemoveHolesDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -132,6 +132,7 @@ void RepairGUI_RemoveIntWiresDlg::Init()
//=================================================================================
void RepairGUI_RemoveIntWiresDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -147,6 +147,7 @@ void RepairGUI_SewingDlg::Init()
//=================================================================================
void RepairGUI_SewingDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -331,6 +331,7 @@ void RepairGUI_ShapeProcessDlg::init()
//=================================================================================
void RepairGUI_ShapeProcessDlg::onOk()
{
setIsApplyAndClose( true );
if ( onApply() )
ClickOnCancel();
}

View File

@ -138,6 +138,7 @@ void RepairGUI_SuppressFacesDlg::Init()
//=================================================================================
void RepairGUI_SuppressFacesDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -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;
}

View File

@ -262,6 +262,7 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked (int constructorId)
//=================================================================================
void TransformationGUI_MultiRotationDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -292,6 +292,7 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked (int constructor
//=================================================================================
void TransformationGUI_MultiTranslationDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if (ClickOnApply())
ClickOnCancel();
}

View File

@ -142,6 +142,7 @@ void TransformationGUI_OffsetDlg::Init()
//=================================================================================
void TransformationGUI_OffsetDlg::ClickOnOk()
{
setIsApplyAndClose( true );
if ( ClickOnApply() )
ClickOnCancel();
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}