mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-30 01:10:34 +05:00
IPAL22456: TC6.3.0: main shape dissapears after Explode with Select Sub Shapes option.
This commit is contained in:
parent
21399917a5
commit
56c5e93e6b
@ -18,7 +18,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
// File : EntityGUI_SubShapeDlg.cxx
|
// File : EntityGUI_SubShapeDlg.cxx
|
||||||
@ -64,7 +63,9 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl)
|
bool modal, Qt::WindowFlags fl)
|
||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
|
||||||
|
myWithShape(true),
|
||||||
|
myIsHiddenMain(false)
|
||||||
{
|
{
|
||||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SUBSHAPE")));
|
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SUBSHAPE")));
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||||
@ -111,6 +112,11 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_SubShapeDlg::~EntityGUI_SubShapeDlg()
|
EntityGUI_SubShapeDlg::~EntityGUI_SubShapeDlg()
|
||||||
{
|
{
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myObject);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -289,6 +295,12 @@ void EntityGUI_SubShapeDlg::SelectionIntoArgument()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myObject);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
|
|
||||||
TopoDS_Shape S = GEOMBase::GetTopoFromSelection(aSelList);
|
TopoDS_Shape S = GEOMBase::GetTopoFromSelection(aSelList);
|
||||||
if (S.IsNull() || S.ShapeType() == TopAbs_VERTEX) {
|
if (S.IsNull() || S.ShapeType() == TopAbs_VERTEX) {
|
||||||
myObject = GEOM::GEOM_Object::_nil();
|
myObject = GEOM::GEOM_Object::_nil();
|
||||||
@ -393,6 +405,11 @@ void EntityGUI_SubShapeDlg::LineEditReturnPressed()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void EntityGUI_SubShapeDlg::ResetStateOfDialog()
|
void EntityGUI_SubShapeDlg::ResetStateOfDialog()
|
||||||
{
|
{
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myObject);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
myObject = GEOM::GEOM_Object::_nil();
|
myObject = GEOM::GEOM_Object::_nil();
|
||||||
myShape.Nullify();
|
myShape.Nullify();
|
||||||
myEditCurrentArgument->setText("");
|
myEditCurrentArgument->setText("");
|
||||||
@ -641,7 +658,15 @@ void EntityGUI_SubShapeDlg::activateSelection()
|
|||||||
if (!myObject->_is_nil() && !isAllSubShapes())
|
if (!myObject->_is_nil() && !isAllSubShapes())
|
||||||
{
|
{
|
||||||
GEOM_Displayer* aDisplayer = getDisplayer();
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
SALOME_View* view = GEOM_Displayer::GetActiveView();
|
||||||
|
if (view) {
|
||||||
|
CORBA::String_var aMainEntry = myObject->GetStudyEntry();
|
||||||
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
|
||||||
|
if (view->isVisible(io)) {
|
||||||
aDisplayer->Erase(myObject, false, false);
|
aDisplayer->Erase(myObject, false, false);
|
||||||
|
myIsHiddenMain = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
||||||
|
|
||||||
|
@ -88,6 +88,8 @@ private:
|
|||||||
|
|
||||||
bool myWithShape;
|
bool myWithShape;
|
||||||
|
|
||||||
|
bool myIsHiddenMain;
|
||||||
|
|
||||||
DlgRef_1Sel1List1Check3Btn* GroupPoints;
|
DlgRef_1Sel1List1Check3Btn* GroupPoints;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
// File : GroupGUI_GroupDlg.cxx
|
// File : GroupGUI_GroupDlg.cxx
|
||||||
@ -72,7 +71,8 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, false),
|
: GEOMBase_Skeleton(theGeometryGUI, parent, false),
|
||||||
myMode(mode),
|
myMode(mode),
|
||||||
myBusy(false),
|
myBusy(false),
|
||||||
myIsShapeType(false)
|
myIsShapeType(false),
|
||||||
|
myIsHiddenMain(false)
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
|
||||||
@ -184,6 +184,11 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
|
|
||||||
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
|
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
|
||||||
{
|
{
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myMainObj);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -461,6 +466,11 @@ void GroupGUI_GroupDlg::SelectionIntoArgument()
|
|||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First());
|
GEOMBase::ConvertIOinGEOMObject(aSelList.First());
|
||||||
|
|
||||||
if (GEOMBase::IsShape(anObj)) {
|
if (GEOMBase::IsShape(anObj)) {
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myMainObj);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
myMainObj = anObj;
|
myMainObj = anObj;
|
||||||
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
||||||
// activate subshapes selection by default
|
// activate subshapes selection by default
|
||||||
@ -470,6 +480,11 @@ void GroupGUI_GroupDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (myIsHiddenMain) {
|
||||||
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
aDisplayer->Display(myMainObj);
|
||||||
|
myIsHiddenMain = false;
|
||||||
|
}
|
||||||
myMainObj = GEOM::GEOM_Object::_nil();
|
myMainObj = GEOM::GEOM_Object::_nil();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -788,7 +803,15 @@ void GroupGUI_GroupDlg::activateSelection()
|
|||||||
myIsShapeType) // check if shape type is already choosen by user
|
myIsShapeType) // check if shape type is already choosen by user
|
||||||
{
|
{
|
||||||
GEOM_Displayer* aDisplayer = getDisplayer();
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
|
SALOME_View* view = GEOM_Displayer::GetActiveView();
|
||||||
|
if (view) {
|
||||||
|
CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
|
||||||
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
|
||||||
|
if (view->isVisible(io)) {
|
||||||
aDisplayer->Erase(myMainObj, false, false);
|
aDisplayer->Erase(myMainObj, false, false);
|
||||||
|
myIsHiddenMain = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ private:
|
|||||||
Mode myMode;
|
Mode myMode;
|
||||||
bool myBusy;
|
bool myBusy;
|
||||||
bool myIsShapeType;
|
bool myIsShapeType;
|
||||||
|
bool myIsHiddenMain;
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user