+ respect Selectable property in SoFCUnifiedSelection node
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5136 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
@@ -250,7 +250,7 @@ void SoFCUnifiedSelection::doAction(SoAction *action)
|
||||
App::Document* doc = App::GetApplication().getDocument(selaction->SelChange.pDocName);
|
||||
App::DocumentObject* obj = doc->getObject(selaction->SelChange.pObjectName);
|
||||
ViewProvider*vp = Application::Instance->getViewProvider(obj);
|
||||
if (vp && vp->useNewSelectionModel()) {
|
||||
if (vp && vp->useNewSelectionModel() && vp->isSelectable()) {
|
||||
SoSelectionElementAction::Type type = SoSelectionElementAction::None;
|
||||
if (selaction->SelChange.Type == SelectionChanges::AddSelection)
|
||||
type = SoSelectionElementAction::All;
|
||||
@@ -269,7 +269,7 @@ void SoFCUnifiedSelection::doAction(SoAction *action)
|
||||
for (std::vector<ViewProvider*>::iterator it = vps.begin(); it != vps.end(); ++it) {
|
||||
ViewProviderDocumentObject* vpd = static_cast<ViewProviderDocumentObject*>(*it);
|
||||
if (vpd->useNewSelectionModel()) {
|
||||
if (Selection().isSelected(vpd->getObject())) {
|
||||
if (Selection().isSelected(vpd->getObject()) && vpd->isSelectable()) {
|
||||
SoSelectionElementAction action(SoSelectionElementAction::All);
|
||||
action.setColor(this->colorSelection.getValue());
|
||||
action.apply(vpd->getRoot());
|
||||
|
||||
@@ -68,6 +68,8 @@ public:
|
||||
void updateData(const App::Property*);
|
||||
|
||||
SoFCSelection* getHighlightNode() const { return pcHighlight; }
|
||||
bool isSelectable(void) const {return Selectable.getValue();}
|
||||
|
||||
/**
|
||||
* Returns a list of picked points from the geometry under \a pcHighlight.
|
||||
* If \a pickAll is false (the default) only the intersection point closest to the camera will be picked, otherwise
|
||||
|
||||
Reference in New Issue
Block a user