+ correctly handle toggle selection in BRep shape nodes
This commit is contained in:
parent
19c840e1ab
commit
6111f55a89
|
@ -582,10 +582,10 @@ void View3DInventorViewer::initialize()
|
||||||
void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCaller,
|
void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCaller,
|
||||||
Gui::SelectionSingleton::MessageType Reason)
|
Gui::SelectionSingleton::MessageType Reason)
|
||||||
{
|
{
|
||||||
if(Reason.Type == SelectionChanges::AddSelection ||
|
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||||
Reason.Type == SelectionChanges::RmvSelection ||
|
Reason.Type == SelectionChanges::RmvSelection ||
|
||||||
Reason.Type == SelectionChanges::SetSelection ||
|
Reason.Type == SelectionChanges::SetSelection ||
|
||||||
Reason.Type == SelectionChanges::ClrSelection) {
|
Reason.Type == SelectionChanges::ClrSelection) {
|
||||||
SoFCSelectionAction cAct(Reason);
|
SoFCSelectionAction cAct(Reason);
|
||||||
cAct.apply(pcViewProviderRoot);
|
cAct.apply(pcViewProviderRoot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,7 +321,8 @@ void SoBrepEdgeSet::doAction(SoAction* action)
|
||||||
case Gui::SoSelectionElementAction::Remove:
|
case Gui::SoSelectionElementAction::Remove:
|
||||||
{
|
{
|
||||||
int start = this->selectionIndex.find(index);
|
int start = this->selectionIndex.find(index);
|
||||||
this->selectionIndex.deleteValues(start,1);
|
if (start >= 0)
|
||||||
|
this->selectionIndex.deleteValues(start,1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -144,7 +144,8 @@ void SoBrepFaceSet::doAction(SoAction* action)
|
||||||
case Gui::SoSelectionElementAction::Remove:
|
case Gui::SoSelectionElementAction::Remove:
|
||||||
{
|
{
|
||||||
int start = this->selectionIndex.find(index);
|
int start = this->selectionIndex.find(index);
|
||||||
this->selectionIndex.deleteValues(start,1);
|
if (start >= 0)
|
||||||
|
this->selectionIndex.deleteValues(start,1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -256,7 +256,8 @@ void SoBrepPointSet::doAction(SoAction* action)
|
||||||
case Gui::SoSelectionElementAction::Remove:
|
case Gui::SoSelectionElementAction::Remove:
|
||||||
{
|
{
|
||||||
int start = this->selectionIndex.find(index);
|
int start = this->selectionIndex.find(index);
|
||||||
this->selectionIndex.deleteValues(start,1);
|
if (start >= 0)
|
||||||
|
this->selectionIndex.deleteValues(start,1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user