-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMGUI : GUI for Geometry component
// File : TransformationGUI_MirrorDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
initName(tr("GEOM_MIRROR"));
ConstructorsClicked(0);
- resize(0,0);
+ resize(minimumSizeHint());
}
//=================================================================================
return false;
initName();
+
+ myObjects.length(0);
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
//Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = findObjectInFather(myArgument, aName);
- if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
+ if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations(getStudyId());
myArgument = aShapesOp->GetSubShape(myArgument, anIndex);
}
// clear selection
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ /* disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));*/
+ // here commented, because multiple objects can be selected IPAL 21437
displayPreview();
}
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
- this, SLOT( SelectionIntoArgument() ) );
+ this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
+
switch (getConstructorId()) {
case 0:
{
if (toCreateCopy) {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorPointCopy(myObjects[i], myArgument);
+ anObj = anOper->MirrorPointCopy(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
}
else {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorPoint(myObjects[i], myArgument);
+ anObj = anOper->MirrorPoint(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
{
if (toCreateCopy) {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorAxisCopy(myObjects[i], myArgument);
+ anObj = anOper->MirrorAxisCopy(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
}
else {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorAxis(myObjects[i], myArgument);
+ anObj = anOper->MirrorAxis(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
{
if (toCreateCopy) {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorPlaneCopy(myObjects[i], myArgument);
+ anObj = anOper->MirrorPlaneCopy(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
}
else {
for (int i = 0; i < myObjects.length(); i++) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MirrorPlane(myObjects[i], myArgument);
+ anObj = anOper->MirrorPlane(myObjects[i], myArgument);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
/*theFindMethod=*/GEOM::FSM_Transformed,
- /*theInheritFirstArg=*/true);
+ /*theInheritFirstArg=*/true,
+ mainFrame()->CheckBoxAddPrefix->isChecked());
}
}
return;
}
addSubshapesToFather(objMap);
- }
+ }
}