make SoFCUnifiedSelection work with nested children in 3DView

This commit is contained in:
jriegel 2012-04-12 18:52:14 +02:00 committed by Stefan Tröger
parent e5c4d2aa70
commit 117238da50
6 changed files with 2773 additions and 13 deletions

View File

@ -168,7 +168,7 @@ public:
/// Attach a view (get called by the MDIView constructor)
void attachView(Gui::BaseView* pcView, bool bPassiv=false);
/// Detach a view (get called by the MDIView destructor)
void detachView(Gui::BaseView* pcView, bool bPassiv=false);
void detachView(Gui::BaseView* pcView, bool bPassiv=false);
/// helper for selection
ViewProvider* getViewProviderByPathFromTail(SoPath * path) const;
/// call update on all attached views

View File

@ -23,15 +23,15 @@
#ifndef GUI_SOFCUNIFIEDSELECTION_H
#define GUI_SOFCUNIFIEDSELECTION_H
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# else
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# else
# ifdef FC_OS_WIN32
# define NOMINMAX
# include <windows.h>
# endif
# include <GL/gl.h>
# endif
# endif
# include <GL/gl.h>
# endif
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/nodes/SoSeparator.h>

View File

@ -156,6 +156,7 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent,
// create the inventor widget and set the defaults
_viewer->setDocument(this->_pcDocument);
_viewer->setDocument(this->_pcDocument);
stack->addWidget(_viewer->getWidget());
// http://forum.freecadweb.org/viewtopic.php?f=3&t=6055&sid=150ed90cbefba50f1e2ad4b4e6684eba
// describes a minor error but trying to fix it leads to a major issue

View File

@ -513,16 +513,16 @@ void View3DInventorViewer::init()
} catch (...) {
Base::Console().Warning("Failed to set up gestures. Unknown error.\n");
}
//create the cursors
QBitmap cursor = QBitmap::fromData(QSize(ROTATE_WIDTH, ROTATE_HEIGHT), rotate_bitmap);
QBitmap mask = QBitmap::fromData(QSize(ROTATE_WIDTH, ROTATE_HEIGHT), rotate_mask_bitmap);
spinCursor = QCursor(cursor, mask, ROTATE_HOT_X, ROTATE_HOT_Y);
cursor = QBitmap::fromData(QSize(ZOOM_WIDTH, ZOOM_HEIGHT), zoom_bitmap);
mask = QBitmap::fromData(QSize(ZOOM_WIDTH, ZOOM_HEIGHT), zoom_mask_bitmap);
zoomCursor = QCursor(cursor, mask, ZOOM_HOT_X, ZOOM_HOT_Y);
cursor = QBitmap::fromData(QSize(PAN_WIDTH, PAN_HEIGHT), pan_bitmap);
mask = QBitmap::fromData(QSize(PAN_WIDTH, PAN_HEIGHT), pan_mask_bitmap);
panCursor = QCursor(cursor, mask, PAN_HOT_X, PAN_HOT_Y);
@ -858,7 +858,7 @@ void View3DInventorViewer::setSceneGraph(SoNode* root)
SoSearchAction sa;
sa.setNode(this->backlight);
//we want the rendered scene with all lights and cameras, viewer->getSceneGraph would return
//we want the rendered scene with all lights and cameras, viewer->getSceneGraph would return
//the geometry scene only
SoNode* scene = this->getSoRenderManager()->getSceneGraph();
if (scene && scene->getTypeId().isDerivedFrom(SoSeparator::getClassTypeId())) {
@ -1462,7 +1462,7 @@ void View3DInventorViewer::renderScene(void)
for (std::list<GLGraphicsItem*>::iterator it = this->graphicsItems.begin(); it != this->graphicsItems.end(); ++it)
(*it)->paintGL();
//fps rendering
if (fpsEnabled) {
std::stringstream stream;

File diff suppressed because it is too large Load Diff

View File

@ -341,7 +341,7 @@ public:
NavigationStyle* navigationStyle() const;
void setDocument(Gui::Document *pcDocument);
virtual PyObject *getPyObject(void);
protected: