Commit c9849ccb authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt
Browse files

Fixed a few bugs in Coordsys display and picking

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10483 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ba551373
...@@ -534,7 +534,7 @@ Core::init() { ...@@ -534,7 +534,7 @@ Core::init() {
this, SLOT( viewUpdated()) ,Qt::DirectConnection); this, SLOT( viewUpdated()) ,Qt::DirectConnection);
connect( coreWidget_->examiner_widgets_[i], SIGNAL( viewChanged() ), connect( coreWidget_->examiner_widgets_[i], SIGNAL( viewChanged() ),
this, SIGNAL( pluginViewChanged() ) ,Qt::DirectConnection); coreWidget_->examiner_widgets_[i], SLOT( updateGL() ) ,Qt::DirectConnection);
} }
} }
......
...@@ -184,21 +184,24 @@ ACG::SceneGraph::CoordsysNode::ProjectionMode CoreWidget::getCoordsysProjection( ...@@ -184,21 +184,24 @@ ACG::SceneGraph::CoordsysNode::ProjectionMode CoreWidget::getCoordsysProjection(
} }
/// Toggle coordsys projection mode of the active viewer /// Toggle coordsys projection mode of the active viewer
void CoreWidget::slotContextSwitchCoordsysProjection() { void CoreWidget::slotContextSwitchCoordsysProjection() {
// Find coordsys node // Find coordsys node
ACG::SceneGraph::BaseNode* node = 0; ACG::SceneGraph::BaseNode* node = 0;
node = PluginFunctions::getSceneGraphRootNode()->find("Core Coordsys Node"); node = PluginFunctions::getSceneGraphRootNode()->find("Core Coordsys Node");
if (node != 0) { if (node != 0) {
ACG::SceneGraph::CoordsysNode* cnode = dynamic_cast<ACG::SceneGraph::CoordsysNode*> (node); ACG::SceneGraph::CoordsysNode* cnode = dynamic_cast<ACG::SceneGraph::CoordsysNode*> (node);
if (cnode->getProjectionMode() == ACG::SceneGraph::CoordsysNode::PERSPECTIVE_PROJECTION) { if (cnode->getProjectionMode() == ACG::SceneGraph::CoordsysNode::PERSPECTIVE_PROJECTION) {
cnode->setProjectionMode(ACG::SceneGraph::CoordsysNode::ORTHOGRAPHIC_PROJECTION); cnode->setProjectionMode(ACG::SceneGraph::CoordsysNode::ORTHOGRAPHIC_PROJECTION);
} }
else { else {
cnode->setProjectionMode(ACG::SceneGraph::CoordsysNode::PERSPECTIVE_PROJECTION); cnode->setProjectionMode(ACG::SceneGraph::CoordsysNode::PERSPECTIVE_PROJECTION);
} }
} else { } else {
emit statusMessage(QString(tr("slotContextSwitchCoordsysProjection(): Could not find coordsys node, thus its projection mode will not be toggled."))); emit statusMessage(QString(tr("slotContextSwitchCoordsysProjection(): Could not find coordsys node, thus its projection mode will not be toggled.")));
} }
for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
examiner_widgets_[i]->updateGL();
} }
/// Toggle projection mode of all viewers to perspective projection /// Toggle projection mode of all viewers to perspective projection
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment