Use View3DInventorViewer::setSelectionEnabled instead of SoFCUnifiedSelection::selectionRole
This commit is contained in:
@@ -72,7 +72,6 @@
|
||||
#include "SelectionObject.h"
|
||||
#include "SoAxisCrossKit.h"
|
||||
#include "SoFCOffscreenRenderer.h"
|
||||
#include "SoFCUnifiedSelection.h"
|
||||
#include "TextureMapping.h"
|
||||
#include "Tools.h"
|
||||
#include "Tree.h"
|
||||
@@ -2831,8 +2830,7 @@ static void doSelect(void* ud, SoEventCallback * cb)
|
||||
bool selectElement = ud ? true : false;
|
||||
auto viewer = static_cast<Gui::View3DInventorViewer*>(cb->getUserData());
|
||||
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(true);
|
||||
viewer->setSelectionEnabled(true);
|
||||
|
||||
SelectionMode selectionMode = CENTER;
|
||||
|
||||
@@ -2897,9 +2895,9 @@ void StdBoxSelection::activated(int iMsg)
|
||||
SoKeyboardEvent ev;
|
||||
viewer->navigationStyle()->processEvent(&ev);
|
||||
}
|
||||
|
||||
SelectionCallbackHandler::Create(viewer, View3DInventorViewer::Rubberband, QCursor(QPixmap(cursor_box_select), 7, 7), doSelect, nullptr);
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(false);
|
||||
viewer->setSelectionEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2978,9 +2976,9 @@ void StdBoxElementSelection::activated(int iMsg)
|
||||
SoKeyboardEvent ev;
|
||||
viewer->navigationStyle()->processEvent(&ev);
|
||||
}
|
||||
|
||||
SelectionCallbackHandler::Create(viewer, View3DInventorViewer::Rubberband, QCursor(QPixmap(cursor_box_element_select), 7, 7), doSelect, this);
|
||||
SoNode* root = viewer->getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(false);
|
||||
viewer->setSelectionEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user