Do not use a view provider's bounding box node when handling BoundBox selection style because it leads to some inconsistent behaviour.
Instead let SoBoxSelectionRenderAction render the bounding box.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
|
||||
#include "SoFCSelectionAction.h"
|
||||
#include "SoFCSelection.h"
|
||||
#include "SoFCUnifiedSelection.h"
|
||||
#include <Inventor/bundles/SoMaterialBundle.h>
|
||||
#include <Inventor/elements/SoSwitchElement.h>
|
||||
#include "Selection.h"
|
||||
@@ -1235,6 +1236,20 @@ SoBoxSelectionRenderAction::apply(SoNode * node)
|
||||
}
|
||||
}
|
||||
PRIVATE(this)->searchaction->reset();
|
||||
|
||||
// Search for selections of SoFCUnifiedSelection
|
||||
PRIVATE(this)->searchaction->setType(SoFCUnifiedSelection::getClassTypeId());
|
||||
PRIVATE(this)->searchaction->setInterest(SoSearchAction::FIRST);
|
||||
PRIVATE(this)->searchaction->apply(node);
|
||||
SoFullPath * path = static_cast<SoFullPath *>(PRIVATE(this)->searchaction->getPath());
|
||||
if (path) {
|
||||
SoFCUnifiedSelection * selection = static_cast<SoFCUnifiedSelection *>(path->getTail());
|
||||
if (selection->getNumSelected()) {
|
||||
PRIVATE(this)->basecolor->rgb.setValue(selection->colorSelection.getValue());
|
||||
this->drawBoxes(path, selection->getList());
|
||||
}
|
||||
}
|
||||
PRIVATE(this)->searchaction->reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user