X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBlocksGUI%2FBlocksGUI_ExplodeDlg.cxx;h=f9f543b0f870870494941786159d3aa5e7f358c9;hb=40d76807e945ceef6a730f4d0177e167d3ccb453;hp=b21c722cab2d1b8a63ca7514e413768714cf5116;hpb=7961b83044d771b15dbbe57ed71c20e67efec023;p=modules%2Fgeom.git diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index b21c722ca..f9f543b0f 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -39,14 +39,14 @@ #include #include #include -#include +#include //================================================================================= // class : BlocksGUI_ExplodeDlg() // purpose : Constructs a BlocksGUI_ExplodeDlg which is a child of 'parent'. //================================================================================= BlocksGUI_ExplodeDlg::BlocksGUI_ExplodeDlg( GeometryGUI* theGeometryGUI, QWidget* parent ) - : GEOMBase_Skeleton( theGeometryGUI, parent ) + : GEOMBase_Skeleton( theGeometryGUI, parent ), myNbBlocks( 0 ) { QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_BLOCK_EXPLODE" ) ) ); QPixmap imageS( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); @@ -189,7 +189,7 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply() } } - if ( !onAccept() ) + if ( !onAccept( true, true, false ) ) return false; activateSelection(); @@ -351,7 +351,7 @@ void BlocksGUI_ExplodeDlg::updateButtonState() //================================================================================= bool BlocksGUI_ExplodeDlg::isAllSubShapes() const { - return !myGrp1->CheckBox1->isChecked() || !myGrp1->CheckBox1->isEnabled(); + return !(myGrp1->CheckBox1->isEnabled() && myGrp1->CheckBox1->isChecked()); } //================================================================================= @@ -360,7 +360,7 @@ bool BlocksGUI_ExplodeDlg::isAllSubShapes() const //================================================================================= GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation() { - return getGeomEngine()->GetIBlocksOperations( getStudyId() ); + return getGeomEngine()->GetIBlocksOperations(); } //================================================================================= @@ -513,3 +513,15 @@ QString BlocksGUI_ExplodeDlg::getNewObjectName (int) const { return QString::null; } + +//================================================================================= +// function : getSourceObjects +// purpose : virtual method to get source objects +//================================================================================= +QList BlocksGUI_ExplodeDlg::getSourceObjects() +{ + QList res; + GEOM::GeomObjPtr aGeomObjPtr(myObject); + res << aGeomObjPtr; + return res; +}