mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4316 Fix regression issue with export completion and import menus showing up everywhere
This commit is contained in:
@@ -835,7 +835,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
|
||||
// Work in progress -- End
|
||||
appendCreateCompletions(menuBuilder, menuBuilder.itemCount() > 0u);
|
||||
appendImportMenu(menuBuilder, menuBuilder.itemCount() > 0u);
|
||||
bool addedExportWellPaths = appendExportWellPaths(menuBuilder, menuBuilder.itemCount() > 0u) > 0;
|
||||
appendExportCompletions(menuBuilder, menuBuilder.itemCount() > 0u && !addedExportWellPaths);
|
||||
|
||||
@@ -1127,7 +1126,8 @@ int RimContextCommandBuilder::appendSubMenuWithCommands(caf::CmdFeatureMenuBuild
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!menuBuilder.isCmdFeatureAdded(candidate))
|
||||
if (caf::CmdFeatureManager::instance()->getCommandFeature(candidate.toStdString())->canFeatureBeExecuted() &&
|
||||
!menuBuilder.isCmdFeatureAdded(candidate))
|
||||
{
|
||||
validCommands << candidate;
|
||||
actualCommandsAdded++;
|
||||
|
||||
Reference in New Issue
Block a user