X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTransformationGUI%2FTransformationGUI_MirrorDlg.cxx;h=5034aee88f278b6994f1136057351adce7fa4f58;hb=7e21a68ba07185cd1dddcf9e1522a28111c2cee4;hp=4e3abf68326a323175100e08f7e5b42384549fe2;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 4e3abf683..5034aee88 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -1,4 +1,4 @@ -// 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 @@ -19,6 +19,7 @@ // // 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. @@ -139,6 +140,7 @@ void TransformationGUI_MirrorDlg::Init() initName(tr("GEOM_MIRROR")); ConstructorsClicked(0); + resize(minimumSizeHint()); } //================================================================================= @@ -288,10 +290,11 @@ void TransformationGUI_MirrorDlg::SelectionIntoArgument() } // 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(); } @@ -366,7 +369,7 @@ void TransformationGUI_MirrorDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -410,21 +413,21 @@ bool TransformationGUI_MirrorDlg::execute (ObjectList& objects) 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()); } @@ -436,16 +439,14 @@ bool TransformationGUI_MirrorDlg::execute (ObjectList& objects) { 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()); } @@ -457,16 +458,14 @@ bool TransformationGUI_MirrorDlg::execute (ObjectList& objects) { 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()); } @@ -490,7 +489,8 @@ void TransformationGUI_MirrorDlg::restoreSubShapes (SALOMEDS::Study_ptr theStu // 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()); } }