mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-01 04:10:34 +05:00
Mantis issue 0020508: Selection of a group in Suppress Faces. Highlight faces in the viewer.
This commit is contained in:
parent
65b8a92884
commit
e85a79e8f8
@ -19,11 +19,10 @@
|
|||||||
//
|
//
|
||||||
// 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 : RepairGUI_SuppressFacesDlg.cxx
|
// File : RepairGUI_SuppressFacesDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
//
|
|
||||||
#include "RepairGUI_SuppressFacesDlg.h"
|
#include "RepairGUI_SuppressFacesDlg.h"
|
||||||
|
|
||||||
#include <DlgRef.h>
|
#include <DlgRef.h>
|
||||||
@ -207,6 +206,8 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (aMap.IsEmpty() && aSelList.Extent() > 0) { // try to detect selected published sub-shape
|
if (aMap.IsEmpty() && aSelList.Extent() > 0) { // try to detect selected published sub-shape
|
||||||
|
TColStd_MapOfInteger anIds;
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(myGeomGUI->getApp()->activeStudy());
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(myGeomGUI->getApp()->activeStudy());
|
||||||
if (!appStudy) return;
|
if (!appStudy) return;
|
||||||
_PTR(Study) aStudy = appStudy->studyDS();
|
_PTR(Study) aStudy = appStudy->studyDS();
|
||||||
@ -232,11 +233,30 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument()
|
|||||||
int anIndex = aMainMap.FindIndex(aSubShape);
|
int anIndex = aMainMap.FindIndex(aSubShape);
|
||||||
if (anIndex >= 0) {
|
if (anIndex >= 0) {
|
||||||
aMap.Add(anIndex);
|
aMap.Add(anIndex);
|
||||||
|
anIds.Add(anIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!aMap.IsEmpty()) {
|
||||||
|
// highlight local faces, correspondent to OB selection
|
||||||
|
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||||
|
|
||||||
|
aSelMgr->clearSelected();
|
||||||
|
|
||||||
|
Standard_Boolean isOk;
|
||||||
|
char* objIOR = GEOMBase::GetIORFromObject(myObject);
|
||||||
|
Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape(objIOR, isOk, true);
|
||||||
|
free(objIOR);
|
||||||
|
if (!isOk || aSh.IsNull())
|
||||||
|
return;
|
||||||
|
|
||||||
|
aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false);
|
||||||
|
|
||||||
|
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||||
|
this, SLOT(SelectionIntoArgument()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const int n = aMap.Extent();
|
const int n = aMap.Extent();
|
||||||
|
Loading…
Reference in New Issue
Block a user