From: dmv Date: Tue, 5 Oct 2010 13:52:41 +0000 (+0000) Subject: 0021020: EDF 1590 GEOM: No "Set presentation parameters and subshapes from arguments... X-Git-Tag: V5_1_5rc1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9bf18f032546f765497e111e74918993dff67022;p=modules%2Fgeom.git 0021020: EDF 1590 GEOM: No "Set presentation parameters and subshapes from arguments" in multi- translation/rotation --- diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 00410ea64..aebe44d82 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -153,6 +153,8 @@ void TransformationGUI_MultiRotationDlg::Init() myBase = myVector = GEOM::GEOM_Object::_nil(); + mainFrame()->GroupBoxPublish->show(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -620,3 +622,24 @@ void TransformationGUI_MultiRotationDlg::addSubshapesToStudy() } addSubshapesToFather(objMap); } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject) +{ + if (mainFrame()->CheckBoxRestoreSS->isChecked()) { + // we pass here the first operation argument (object) through the list of arguments + // because the rotation operation place its arguments in the data structure in another order, + // and we need to point the first argument directly + GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO; + anArgs->length(1); + anArgs[0] = myBase; + getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs, + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true, + mainFrame()->CheckBoxAddPrefix->isChecked()); + } +} diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h index c8f05b819..b0874fa41 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h @@ -51,6 +51,7 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 996030db8..3edb08022 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -160,6 +160,8 @@ void TransformationGUI_MultiTranslationDlg::Init() myBase = myVectorU = myVectorV = GEOM::GEOM_Object::_nil(); + mainFrame()->GroupBoxPublish->show(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -731,3 +733,24 @@ void TransformationGUI_MultiTranslationDlg::addSubshapesToStudy() } addSubshapesToFather(objMap); } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject) +{ + if (mainFrame()->CheckBoxRestoreSS->isChecked()) { + // we pass here the first operation argument (object) through the list of arguments + // because the rotation operation place its arguments in the data structure in another order, + // and we need to point the first argument directly + GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO; + anArgs->length(1); + anArgs[0] = myBase; + getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs, + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true, + mainFrame()->CheckBoxAddPrefix->isChecked()); + } +} diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h index 3e1f146d8..92457a839 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h @@ -51,6 +51,7 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init();