mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
0014047: EDF PAL 334 : Problem to select merged face with Create group window
hide a previously invisivle second shape in case of "Only sub-shapes of the Second shape" restriction
This commit is contained in:
parent
adc67f3fdf
commit
27eae2a6a0
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
enum { ALL_SUBSHAPES = 0, GET_IN_PLACE, SUBSHAPES_OF_SHAPE2 };
|
enum { ALL_SUBSHAPES = 0, GET_IN_PLACE, SUBSHAPES_OF_SHAPE2, SUBSHAPES_OF_INVISIBLE_SHAPE2 };
|
||||||
|
|
||||||
GroupGUI_GroupDlg::GroupGUI_GroupDlg(Mode mode, GeometryGUI* theGeometryGUI, QWidget* parent)
|
GroupGUI_GroupDlg::GroupGUI_GroupDlg(Mode mode, GeometryGUI* theGeometryGUI, QWidget* parent)
|
||||||
:GEOMBase_Skeleton( theGeometryGUI, parent, "GroupGUI_GroupDlg", false,
|
:GEOMBase_Skeleton( theGeometryGUI, parent, "GroupGUI_GroupDlg", false,
|
||||||
@ -389,7 +389,10 @@ void GroupGUI_GroupDlg::onGetInPlace()
|
|||||||
setInPlaceObj( aGetInPlaceObj );
|
setInPlaceObj( aGetInPlaceObj );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setInPlaceObj( anObj );
|
bool isVisible = true;
|
||||||
|
if ( SALOME_View* view = GEOM_Displayer::GetActiveView() )
|
||||||
|
isVisible = view->isVisible( firstIObject() );
|
||||||
|
setInPlaceObj( anObj, isVisible );
|
||||||
}
|
}
|
||||||
myEditCurrentArgument = 0;
|
myEditCurrentArgument = 0;
|
||||||
//myBusy = true; // just activate but do not select in the list
|
//myBusy = true; // just activate but do not select in the list
|
||||||
@ -404,14 +407,16 @@ void GroupGUI_GroupDlg::onGetInPlace()
|
|||||||
//purpose : temporarily add an object to study and remove old InPlaceObj
|
//purpose : temporarily add an object to study and remove old InPlaceObj
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void GroupGUI_GroupDlg::setInPlaceObj( GEOM::GEOM_Object_var theObj )
|
void GroupGUI_GroupDlg::setInPlaceObj( GEOM::GEOM_Object_var theObj, const bool isVisible )
|
||||||
{
|
{
|
||||||
if ( ! myInPlaceObj->_is_equivalent( theObj ) )
|
if ( ! myInPlaceObj->_is_equivalent( theObj ) )
|
||||||
{
|
{
|
||||||
const char* tmpName = "__InPlaceObj__";
|
const char* tmpName = "__InPlaceObj__";
|
||||||
// remove old InPlaceObj
|
// remove old InPlaceObj
|
||||||
if ( !myInPlaceObj->_is_nil() ) {
|
if ( !myInPlaceObj->_is_nil() ) {
|
||||||
if ( myInPlaceObjSelectWay == GET_IN_PLACE ) { // hide temporary object
|
if ( myInPlaceObjSelectState == GET_IN_PLACE ||
|
||||||
|
myInPlaceObjSelectState == SUBSHAPES_OF_INVISIBLE_SHAPE2 ) {
|
||||||
|
// hide temporary object or initially invisible shape 2 (issue 0014047)
|
||||||
GEOM_Displayer aDisplayer(getStudy());
|
GEOM_Displayer aDisplayer(getStudy());
|
||||||
aDisplayer.Erase( myInPlaceObj, true );
|
aDisplayer.Erase( myInPlaceObj, true );
|
||||||
}
|
}
|
||||||
@ -443,7 +448,9 @@ void GroupGUI_GroupDlg::setInPlaceObj( GEOM::GEOM_Object_var theObj )
|
|||||||
myMain2InPlaceIndices.Bind( aMainIndex, aPlaceIndex );
|
myMain2InPlaceIndices.Bind( aMainIndex, aPlaceIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myInPlaceObjSelectWay = subSelectionWay();
|
myInPlaceObjSelectState = subSelectionWay();
|
||||||
|
if ( myInPlaceObjSelectState == SUBSHAPES_OF_SHAPE2 && !isVisible )
|
||||||
|
myInPlaceObjSelectState = SUBSHAPES_OF_INVISIBLE_SHAPE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -90,7 +90,7 @@ private:
|
|||||||
void updateState();
|
void updateState();
|
||||||
void highlightSubShapes();
|
void highlightSubShapes();
|
||||||
void onGetInPlace();
|
void onGetInPlace();
|
||||||
void setInPlaceObj( GEOM::GEOM_Object_var theObj );
|
void setInPlaceObj( GEOM::GEOM_Object_var theObj, const bool isVisible=1 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Mode myMode;
|
Mode myMode;
|
||||||
@ -98,7 +98,7 @@ private:
|
|||||||
GEOM::GEOM_Object_var myMainObj;
|
GEOM::GEOM_Object_var myMainObj;
|
||||||
GEOM::GEOM_Object_var myGroup;
|
GEOM::GEOM_Object_var myGroup;
|
||||||
GEOM::GEOM_Object_var myInPlaceObj;
|
GEOM::GEOM_Object_var myInPlaceObj;
|
||||||
int myInPlaceObjSelectWay;
|
int myInPlaceObjSelectState;
|
||||||
TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices;
|
TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices;
|
||||||
|
|
||||||
QPushButton* mySelBtn;
|
QPushButton* mySelBtn;
|
||||||
|
Loading…
Reference in New Issue
Block a user