Some context menu cleanup

This commit is contained in:
Jacob Støren 2015-08-20 17:19:38 +02:00
parent a6c59f4160
commit 2e1a542749
3 changed files with 28 additions and 7 deletions

View File

@ -61,5 +61,5 @@ void RicCreateGridCaseGroupFeature::onActionTriggered(bool isChecked)
void RicCreateGridCaseGroupFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setIcon(QIcon(":/CreateGridCaseGroup16x16.png"));
actionToSetup->setText("Import Eclipse Case");
actionToSetup->setText("&Create Grid Case Group from Files");
}

View File

@ -95,7 +95,7 @@ void RicDeleteItemFeature::onActionTriggered(bool isChecked)
//--------------------------------------------------------------------------------------------------
void RicDeleteItemFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Delete object");
actionToSetup->setText("Delete");
}
} // end namespace caf

View File

@ -50,6 +50,8 @@
#include "cafCmdFeature.h"
#include "ToggleCommands/RicToggleItemsFeatureImpl.h"
#include "RicExecuteScriptForCasesFeature.h"
#include "RimEclipseStatisticsCaseCollection.h"
#include "RimEclipseStatisticsCase.h"
CAF_PDM_SOURCE_INIT(RimProject, "ResInsightProject");
@ -573,16 +575,33 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
commandIds << "RicNewViewFeature";
commandIds << "RicCopyReferencesToClipboardFeature";
commandIds << "RicPasteGeoMechViewsFeature";
commandIds << "Separator";
commandIds << "RicDeleteItemFeature";
}
else if (dynamic_cast<RimEclipseView*>(uiItem))
{
commandIds << "RicNewViewFeature";
commandIds << "RicCopyReferencesToClipboardFeature";
commandIds << "RicPasteEclipseViewsFeature";
commandIds << "RicNewViewFeature";
commandIds << "Separator";
commandIds << "RicDeleteItemFeature";
}
else if (dynamic_cast<RimEclipseStatisticsCaseCollection*>(uiItem))
{
//menu.addAction(QString("New Statistics Case"), this, SLOT(slotNewStatisticsCase()));
//commandIds << "RicNewStatisticsCaseFeature"
}
else if (dynamic_cast<RimEclipseStatisticsCase*>(uiItem))
{
//menu.addAction(QString("New View"), this, SLOT(slotAddView()));
//menu.addAction(QString("Compute"), this, SLOT(slotComputeStatistics()));
//menu.addAction(QString("Close"), this, SLOT(slotCloseCase()));
commandIds << "RicNewViewFeature";
// commandIds << "RicComputestatistics....";
commandIds << "RicCloseCaseFeature";
commandIds << "RicExecuteScriptForCasesFeature";
}
else if (dynamic_cast<RimEclipseCase*>(uiItem))
{
commandIds << "RicCopyReferencesToClipboardFeature";
@ -599,14 +618,15 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
{
commandIds << "RicPasteGeoMechViewsFeature";
commandIds << "RicNewViewFeature";
commandIds << "Separator";
commandIds << "RicCloseCaseFeature";
commandIds << "RicExecuteScriptForCasesFeature";
}
else if (dynamic_cast<RimIdenticalGridCaseGroup*>(uiItem))
{
commandIds << "RicNewViewFeature";
commandIds << "RicEclipseCaseNewGroupFeature";
commandIds << "RicPasteEclipseCasesFeature";
commandIds << "RicPasteEclipseViewsFeature";
//commandIds << "RicEcliseCaseGroupCloseFeature";
}
else if (dynamic_cast<RimCaseCollection*>(uiItem))
@ -658,6 +678,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
{
commandIds << "RicWellPathsImportSsihubFeature";
commandIds << "RicWellPathsImportFileFeature";
commandIds << "Separator";
commandIds << "RicWellPathsDeleteAllFeature";
}
else if (dynamic_cast<RimWellPath*>(uiItem))