#1323 Skip separator command when building context menu

This commit is contained in:
Magne Sjaastad 2017-03-19 08:47:29 +01:00
parent ad90d3f38f
commit bd659c0769

View File

@ -487,6 +487,12 @@ void RimContextCommandBuilder::appendCommandsToMenu(const QStringList& commandId
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
for (int i = 0; i < commandIds.size(); i++)
{
if (commandIds[i] == "Separator")
{
menu->addSeparator();
}
else
{
caf::CmdFeature* feature = commandManager->getCommandFeature(commandIds[i].toStdString());
CVF_ASSERT(feature);
@ -507,4 +513,5 @@ void RimContextCommandBuilder::appendCommandsToMenu(const QStringList& commandId
}
}
}
}