diff --git a/ApplicationCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp index 904961b458..f8dbf19272 100644 --- a/ApplicationCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp @@ -44,15 +44,16 @@ #include #include -CAF_CMD_SOURCE_INIT(RicSaveEclipseInputActiveVisibleCellsFeature, "RicSaveEclipseInputActiveVisibleCellsFeature"); CAF_CMD_SOURCE_INIT(RicSaveEclipseInputVisibleCellsFeature, "RicSaveEclipseInputVisibleCellsFeature"); - +CAF_CMD_SOURCE_INIT(RicSaveEclipseInputActiveVisibleCellsFeature, "RicSaveEclipseInputActiveVisibleCellsFeature"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void executeCommand(RimEclipseView* view) { + if (!view) return; + RicSaveEclipseInputVisibleCellsUi exportSettings; caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export FLUXNUM/MULTNUM", ""); RicExportFeatureImpl::configureForExport(&propertyDialog); @@ -148,7 +149,7 @@ RimEclipseView* RicSaveEclipseInputVisibleCellsFeature::selectedView() const //-------------------------------------------------------------------------------------------------- bool RicSaveEclipseInputActiveVisibleCellsFeature::isCommandEnabled() { - return getEclipseActiveView() != nullptr; + return true; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp b/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp index 8eb1b5798d..8a159e80e6 100644 --- a/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp @@ -204,6 +204,7 @@ void RiuMainPlotWindow::createMenus() QMenu* exportMenu = fileMenu->addMenu("&Export"); exportMenu->addAction(cmdFeatureMgr->action("RicSnapshotViewToFileFeature")); exportMenu->addAction(cmdFeatureMgr->action("RicSnapshotAllPlotsToFileFeature")); + exportMenu->addAction(cmdFeatureMgr->action("RicSaveEclipseInputActiveVisibleCellsFeature")); fileMenu->addSeparator(); fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectFeature")); diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index f5d33114e7..0e4d9cd427 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -374,6 +374,8 @@ void RiuMainWindow::createMenus() exportMenu->addAction(cmdFeatureMgr->action("RicSnapshotViewToFileFeature")); exportMenu->addAction(m_snapshotAllViewsToFile); exportMenu->addAction(cmdFeatureMgr->action("RicExportMultipleSnapshotsFeature")); + exportMenu->addSeparator(); + exportMenu->addAction(cmdFeatureMgr->action("RicSaveEclipseInputActiveVisibleCellsFeature")); fileMenu->addSeparator(); fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));