0021020: EDF 1590 GEOM: No "Set presentation parameters and subshapes from arguments" in multi- translation/rotation

This commit is contained in:
dmv 2010-10-05 13:52:41 +00:00
parent 3fa5e045bf
commit 9bf18f0325
4 changed files with 48 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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