Commit 439e32f8 authored by Mike Kremer's avatar Mike Kremer
Browse files

Formatted code :)

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5474 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a48ec38e
...@@ -302,33 +302,34 @@ void MouseAndKeyPlugin::contextMenuItemSelected(QAction* _action) { ...@@ -302,33 +302,34 @@ void MouseAndKeyPlugin::contextMenuItemSelected(QAction* _action) {
// Get object id from QAction object // Get object id from QAction object
QVariant contextObject = _action->data(); QVariant contextObject = _action->data();
int objectId = contextObject.toInt(); int objectId = contextObject.toInt();
if ( objectId == -1) { if (objectId == -1) {
log(LOGINFO, "Could not get associated object id."); log(LOGINFO, "Could not get associated object id.");
return; return;
} }
// Get node associated to object id // Get node associated to object id
ACG::SceneGraph::BaseNode* node = ACG::SceneGraph::find_node( PluginFunctions::getSceneGraphRootNode(), objectId ); ACG::SceneGraph::BaseNode* node = ACG::SceneGraph::find_node(
PluginFunctions::getSceneGraphRootNode(), objectId);
// Return if node id was not valid // Return if node id was not valid
if(!node) { if (!node) {
log(LOGINFO, "Could not find associated object."); log(LOGINFO, "Could not find associated object.");
return; return;
} }
BaseObjectData* obj; BaseObjectData* obj;
if ( ! PluginFunctions::getObject(objectId,obj) ) if (!PluginFunctions::getObject(objectId, obj))
return; return;
// Hide object // Hide object
obj->hide(); obj->hide();
// Tell core that object's visibility has changed // Tell core that object's visibility has changed
visibilityChanged(objectId); visibilityChanged(objectId);
} // End contextMenuItemSelected } // End contextMenuItemSelected
......
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