int shapesNbPoints(const ModuleBase_ISelection* theSelection)
{
- QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected(ModuleBase_ISelection::Viewer);
int aCount = 0;
foreach (ModuleBase_ViewerPrs aPrs, aList) {
const TopoDS_Shape& aShape = aPrs.shape();
int shapesNbLines(const ModuleBase_ISelection* theSelection)
{
- QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected(ModuleBase_ISelection::Viewer);
int aCount = 0;
foreach(ModuleBase_ViewerPrs aPrs, aList) {
const TopoDS_Shape& aShape = aPrs.shape();
bool PartSet_RadiusSelection::isValid(const ModuleBase_ISelection* theSelection) const
{
- QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected(ModuleBase_ISelection::Viewer);
ModuleBase_ViewerPrs aPrs;
int aCount = 0;
foreach (ModuleBase_ViewerPrs aPrs, aList) {
bool PartSet_RigidSelection::isValid(const ModuleBase_ISelection* theSelection) const
{
- QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected(ModuleBase_ISelection::Viewer);
return (aList.count() == 1);
}
bool PartSet_TangentSelection::isValid(const ModuleBase_ISelection* theSelection) const
{
- QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aList = theSelection->getSelected(ModuleBase_ISelection::Viewer);
if ((aList.size() == 0) || (aList.size() > 2))
return false;
//QString aFeatureId = QString::fromStdString(anActiveFeature->getKind());
XGUI_Selection* aSelection = myWorkshop->selector()->selection();
- if (aSelection->getSelected().size() == 0) {
+ // only viewer selection is processed
+ if (aSelection->getSelected(ModuleBase_ISelection::Viewer).size() == 0) {
// it seems that this code is not nesessary anymore. It leads to incorrect case:
// sketch operation start, click in any place in the viewer. The result is all nested
// entities are enabled(but the sketch plane is not selected yet). Any sketch operation