Skip to content

Commit

Permalink
BUG: Fixed qSlicerMarkupsModuleWidgetGenericTest
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.slicer.org/Slicer4/trunk@28691 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information
lassoan committed Dec 18, 2019
1 parent d92e57f commit 07a3c84
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ bool qSlicerSubjectHierarchyPluginHandler::registerPlugin(qSlicerSubjectHierarch
}

// Add view menu actions from plugin to plugin logic
foreach (QAction* action, pluginToRegister->viewContextMenuActions())
if (this->m_PluginLogic)
{
this->m_PluginLogic->registerViewMenuAction(action);
foreach(QAction* action, pluginToRegister->viewContextMenuActions())
{
this->m_PluginLogic->registerViewMenuAction(action);
}
}

// Add the plugin to the list
Expand Down Expand Up @@ -460,6 +463,18 @@ void qSlicerSubjectHierarchyPluginHandler::setPluginLogic(qSlicerSubjectHierarch
}

m_PluginLogic = pluginLogic;

// Register view menu actions of those plugins that were registered before the PluginLogic was set.
if (this->m_PluginLogic)
{
foreach(qSlicerSubjectHierarchyAbstractPlugin * pluginToRegister, this->m_RegisteredPlugins)
{
foreach(QAction * action, pluginToRegister->viewContextMenuActions())
{
this->m_PluginLogic->registerViewMenuAction(action);
}
}
}
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit 07a3c84

Please sign in to comment.