mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
#1597 Remove "New Well Log Plot" and "New Summary Plot" from context menu when no items are selected in project tree
This commit is contained in:
parent
d5d7625864
commit
54bcbe570d
@ -86,12 +86,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
|||||||
std::vector<caf::PdmUiItem*> uiItems;
|
std::vector<caf::PdmUiItem*> uiItems;
|
||||||
caf::SelectionManager::instance()->selectedItems(uiItems);
|
caf::SelectionManager::instance()->selectedItems(uiItems);
|
||||||
|
|
||||||
if (uiItems.size() == 0)
|
if (uiItems.size() == 1)
|
||||||
{
|
|
||||||
commandIds << "RicNewWellLogPlotFeature";
|
|
||||||
commandIds << "RicNewSummaryPlotFeature";
|
|
||||||
}
|
|
||||||
else if (uiItems.size() == 1)
|
|
||||||
{
|
{
|
||||||
caf::PdmUiItem* uiItem = uiItems[0];
|
caf::PdmUiItem* uiItem = uiItems[0];
|
||||||
CVF_ASSERT(uiItem);
|
CVF_ASSERT(uiItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user