#2247 Add export FLIXNUM/MULTNUM to context menu on Cell Result item in tree view

This commit is contained in:
Rebecca Cox 2017-12-12 16:07:02 +01:00
parent 5a03783328
commit 2b0305fcc4
3 changed files with 18 additions and 5 deletions

View File

@ -27,12 +27,13 @@
#include "RifEclipseInputFileTools.h" #include "RifEclipseInputFileTools.h"
#include "RimView.h"
#include "RimEclipseView.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimView.h"
#include "RigEclipseCaseData.h"
#include "RigActiveCellInfo.h" #include "RigActiveCellInfo.h"
#include "RigEclipseCaseData.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -119,9 +120,20 @@ void RicSaveEclipseInputVisibleCellsFeature::setupActionLook(QAction* actionToSe
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseView* RicSaveEclipseInputVisibleCellsFeature::selectedView() RimEclipseView* RicSaveEclipseInputVisibleCellsFeature::selectedView() const
{ {
RimEclipseView* view = dynamic_cast<RimEclipseView*>(caf::SelectionManager::instance()->selectedItem()); RimEclipseView* view = dynamic_cast<RimEclipseView*>(caf::SelectionManager::instance()->selectedItem());
if (view)
{
return view;
}
RimEclipseCellColors* cellResultItem = dynamic_cast<RimEclipseCellColors*>(caf::SelectionManager::instance()->selectedItem());
if (cellResultItem)
{
cellResultItem->firstAncestorOrThisOfType(view);
}
return view; return view;
} }

View File

@ -36,7 +36,7 @@ protected:
virtual void setupActionLook(QAction* actionToSetup) override; virtual void setupActionLook(QAction* actionToSetup) override;
private: private:
RimEclipseView* selectedView(); RimEclipseView* selectedView() const;
}; };
//================================================================================================== //==================================================================================================

View File

@ -185,6 +185,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
else if (dynamic_cast<RimEclipseCellColors*>(uiItem)) else if (dynamic_cast<RimEclipseCellColors*>(uiItem))
{ {
menuBuilder << "RicSaveEclipseResultAsInputPropertyFeature"; menuBuilder << "RicSaveEclipseResultAsInputPropertyFeature";
menuBuilder << "RicSaveEclipseInputVisibleCellsFeature";
} }
else if (dynamic_cast<RimEclipseInputPropertyCollection*>(uiItem)) else if (dynamic_cast<RimEclipseInputPropertyCollection*>(uiItem))
{ {