RicImportGridAndSummaryEnsembleFeature: Add feature for importing grid and summary ensembles

- Add RicImportGridAndSummaryEnsembleFeature with icon and menu/toolbar registration
- Register in main window toolbar, import menu (both windows)
- Add feature to plot window Standard toolbar
- Wire up post-import view and plot creation
- Skip grid/summary ensemble creation when no files of that type are found
- Keep focus in plot window when no grid ensembles are created
This commit is contained in:
Magne Sjaastad committed 2026-03-09 14:43:02 +01:00
1 parent 5b07323ac8
commit fd27722991
15 files changed
+223 -16

No files matched your search

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- SummaryCase.svg content (full size) -->
<path d="M 2.241 12.532 C 2.699 12.532 3.282 12.548 3.714 12.339 C 3.908 12.247 4.162 12.447 4.34 12.298 C 4.631 12.054 5.066 12.26 5.339 11.954 C 6.047 11.163 6.942 10.233 7.565 9.189 C 7.861 8.693 8.469 8.438 8.909 8.438 C 8.986 8.438 9.243 8.368 9.306 8.438 C 9.64 8.81 10.087 8.997 10.432 9.382 C 10.579 9.547 10.68 9.819 10.817 10.003 C 11.319 10.677 11.827 11.273 12.352 11.933 C 12.602 12.247 12.914 12.447 13.222 12.576 C 13.348 12.629 13.65 12.606 13.735 12.748 C 13.735 12.718 13.947 12.694 13.977 12.694 C 14.045 12.651 14.114 12.651 14.182 12.651" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke: rgb(128, 70, 0); stroke-linejoin: round; stroke-width: 0.6px;"/>
<path d="M 11.646 2.853 L 11.646 2.853" style="stroke: rgb(0, 0, 0); fill: rgb(216, 216, 216); stroke-width: 0.6px;"/>
<path d="M 2.307 9.699 C 2.765 9.699 3.347 9.713 3.779 9.505 C 3.973 9.412 4.228 9.612 4.405 9.462 C 4.696 9.219 5.132 9.424 5.405 9.118 C 6.113 8.328 7.008 7.399 7.631 6.353 C 7.927 5.86 8.534 5.603 8.975 5.603 C 9.051 5.603 9.308 5.533 9.372 5.603 C 9.705 5.976 10.153 6.161 10.498 6.547 C 10.645 6.711 10.745 6.986 10.882 7.169 C 11.385 7.841 11.893 8.438 12.418 9.098 C 12.668 9.412 12.979 9.612 13.288 9.742 C 13.414 9.793 13.716 9.77 13.801 9.913 C 13.801 9.882 14.013 9.86 14.043 9.86 C 14.111 9.817 14.179 9.817 14.248 9.817" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke-linejoin: round; stroke: rgb(255, 140, 0); stroke-width: 0.6px;"/>
<path d="M 2.263 6.673 C 2.721 6.673 3.304 6.689 3.736 6.481 C 3.93 6.388 4.184 6.587 4.362 6.438 C 4.653 6.194 5.089 6.399 5.361 6.095 C 6.069 5.304 6.964 4.375 7.587 3.329 C 7.883 2.835 8.491 2.578 8.931 2.578 C 9.008 2.578 9.265 2.509 9.329 2.578 C 9.662 2.952 10.109 3.137 10.454 3.523 C 10.601 3.686 10.702 3.96 10.839 4.144 C 11.341 4.817 11.85 5.414 12.374 6.072 C 12.625 6.388 12.936 6.587 13.244 6.716 C 13.371 6.768 13.672 6.746 13.757 6.888 C 13.757 6.858 13.97 6.835 14 6.835 C 14.067 6.792 14.136 6.792 14.205 6.792" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke-linejoin: round; stroke: rgb(150, 84, 3); stroke-width: 0.6px;"/>
<line style="fill: rgb(253, 194, 93); stroke: rgb(128, 128, 128);" x1="1.378" y1="14.337" x2="1.352" y2="2.051" transform="matrix(-1, 0, 0, -1, 2.73, 16.388)"/>
<line style="fill: rgb(253, 194, 93); stroke: rgb(128, 128, 128);" x1="0.871" y1="14.161" x2="14.262" y2="13.999"/>
<!-- Case.svg badge in lower-right corner (scaled ~62%, with white background) -->
<rect x="6.0" y="10.8" width="10.0" height="4.5" rx="0.4" fill="white" fill-opacity="0.85"/>
<g transform="translate(6.0, 7.0) scale(0.62)">
<path d="M 0.554 13.04 C 1.124 13.04 1.851 13.057 2.39 12.829 C 2.632 12.729 2.949 12.947 3.172 12.785 C 3.534 12.519 4.077 12.743 4.417 12.41 C 5.301 11.549 6.416 10.537 7.194 9.4 C 7.562 8.861 8.32 8.583 8.87 8.583 C 8.966 8.583 9.286 8.507 9.365 8.583 C 9.781 8.989 10.339 9.191 10.77 9.61 C 10.953 9.79 11.077 10.087 11.249 10.287 C 11.876 11.02 12.509 11.669 13.164 12.387 C 13.476 12.729 13.865 12.947 14.249 13.087 C 14.407 13.145 14.782 13.12 14.888 13.274 C 14.888 13.241 15.153 13.216 15.191 13.216 C 15.276 13.169 15.361 13.169 15.447 13.169" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke: rgb(128, 70, 0); stroke-linejoin: round; stroke-width: 1.5px;"/>
<path d="M 0.554 11.835 C 1.124 11.835 1.851 11.851 2.39 11.625 C 2.632 11.524 2.949 11.741 3.172 11.58 C 3.534 11.313 4.077 11.537 4.417 11.205 C 5.301 10.344 6.416 9.333 7.194 8.195 C 7.562 7.656 8.32 7.378 8.87 7.378 C 8.966 7.378 9.286 7.302 9.365 7.378 C 9.781 7.784 10.339 7.986 10.77 8.405 C 10.953 8.584 11.077 8.882 11.249 9.083 C 11.876 9.815 12.509 10.464 13.164 11.182 C 13.476 11.524 13.865 11.741 14.249 11.883 C 14.407 11.939 14.782 11.914 14.888 12.07 C 14.888 12.036 15.153 12.011 15.191 12.011 C 15.276 11.963 15.361 11.963 15.447 11.963" style="fill-opacity: 0; stroke-linejoin: round; fill: rgb(189, 120, 0); stroke: rgb(171, 94, 0); stroke-width: 1.5px;"/>
<path d="M 0.554 10.638 C 1.124 10.638 1.851 10.656 2.39 10.429 C 2.632 10.329 2.949 10.546 3.172 10.384 C 3.534 10.117 4.077 10.341 4.417 10.009 C 5.301 9.148 6.416 8.136 7.194 6.998 C 7.562 6.46 8.32 6.182 8.87 6.182 C 8.966 6.182 9.286 6.106 9.365 6.182 C 9.781 6.588 10.339 6.79 10.77 7.209 C 10.953 7.387 11.077 7.685 11.249 7.886 C 11.876 8.619 12.509 9.268 13.164 9.985 C 13.476 10.329 13.865 10.546 14.249 10.685 C 14.407 10.743 14.782 10.719 14.888 10.873 C 14.888 10.839 15.153 10.814 15.191 10.814 C 15.276 10.768 15.361 10.768 15.447 10.768" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke-linejoin: round; stroke: rgb(210, 117, 3); stroke-width: 1.5px;"/>
<path d="M 0.554 9.482 C 1.124 9.482 1.851 9.497 2.39 9.271 C 2.632 9.17 2.949 9.388 3.172 9.225 C 3.534 8.96 4.077 9.183 4.417 8.85 C 5.301 7.99 6.416 6.979 7.194 5.841 C 7.562 5.303 8.32 5.024 8.87 5.024 C 8.966 5.024 9.286 4.948 9.365 5.024 C 9.781 5.43 10.339 5.632 10.77 6.052 C 10.953 6.23 11.077 6.529 11.249 6.729 C 11.876 7.46 12.509 8.11 13.164 8.828 C 13.476 9.17 13.865 9.388 14.249 9.529 C 14.407 9.585 14.782 9.56 14.888 9.716 C 14.888 9.682 15.153 9.657 15.191 9.657 C 15.276 9.61 15.361 9.61 15.447 9.61" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke-linejoin: round; stroke: rgb(255, 140, 0); stroke-width: 1.5px;"/>
<path d="M 0.554 8.315 C 1.124 8.315 1.851 8.332 2.39 8.105 C 2.632 8.005 2.949 8.222 3.172 8.06 C 3.534 7.793 4.077 8.017 4.417 7.685 C 5.301 6.825 6.416 5.813 7.194 4.675 C 7.562 4.137 8.32 3.858 8.87 3.858 C 8.966 3.858 9.286 3.782 9.365 3.858 C 9.781 4.264 10.339 4.466 10.77 4.886 C 10.953 5.064 11.077 5.362 11.249 5.563 C 11.876 6.295 12.509 6.944 13.164 7.661 C 13.476 8.005 13.865 8.222 14.249 8.361 C 14.407 8.419 14.782 8.394 14.888 8.549 C 14.888 8.516 15.153 8.491 15.191 8.491 C 15.276 8.444 15.361 8.444 15.447 8.444" style="fill: rgb(216, 216, 216); fill-opacity: 0; stroke-linejoin: round; stroke: rgb(150, 84, 3); stroke-width: 1.5px;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -142,6 +142,7 @@
<file>SummaryCases16x16.png</file>
<file>SummaryCurve16x16.png</file>
<file>SummaryCurveFilter16x16.png</file>
<file>GridAndSummaryEnsemble.svg</file>
<file>SummaryEnsemble.svg</file>
<file>SummaryGroup16x16.png</file>
<file>SummaryPlotLight16x16.png</file>
@@ -101,6 +101,8 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonTools.h
${CMAKE_CURRENT_LIST_DIR}/RicPolygonFromImageDialog.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryEnsembleFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportGridAndSummaryEnsembleDialog.h
${CMAKE_CURRENT_LIST_DIR}/RicImportGridAndSummaryEnsembleFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicHistogramPlotTools.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridStatisticsPlotFeature.h
)
@@ -208,6 +210,8 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RicPolygonFromImageDialog.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryEnsembleFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportGridAndSummaryEnsembleDialog.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportGridAndSummaryEnsembleFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicHistogramPlotTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridStatisticsPlotFeature.cpp
)
@@ -26,6 +26,7 @@
#include <QString>
class RimSummaryCase;
class RimSummaryEnsemble;
//==================================================================================================
///
@@ -41,6 +42,12 @@ public:
RiaDefines::EnsembleGroupingMode groupingMode,
bool isEnsemble = false );
static RimSummaryEnsemble* importSingleEnsembleFileSet( const QStringList& fileNames,
bool useEnsembleNameDialog,
RiaDefines::EnsembleGroupingMode groupingMode,
RiaDefines::FileType fileType,
const QString& defaultEnsembleName = QString() );
private:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
@@ -51,10 +58,4 @@ private:
RiaDefines::EnsembleGroupingMode groupingMode,
RiaDefines::FileType fileType,
const QString& defaultEnsembleName = QString() );
static RimSummaryEnsemble* importSingleEnsembleFileSet( const QStringList& fileNames,
bool useEnsembleNameDialog,
RiaDefines::EnsembleGroupingMode groupingMode,
RiaDefines::FileType fileType,
const QString& defaultEnsembleName = QString() );
};
@@ -55,7 +55,8 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicImportGridAndSummaryEnsembleDialogResult RicImportGridAndSummaryEnsembleDialog::runDialog( QWidget* parent )
RicImportGridAndSummaryEnsembleDialogResult
RicImportGridAndSummaryEnsembleDialog::runDialog( QWidget* parent, bool defaultGridChecked, bool defaultSummaryChecked )
{
const QString pathRegistryKey = "RicImportGridAndSummaryEnsembleDialog_path";
@@ -89,6 +90,9 @@ RicImportGridAndSummaryEnsembleDialogResult RicImportGridAndSummaryEnsembleDialo
dialog.m_ensembleGroupingMode->addItem( s );
}
dialog.m_createGridEnsembleCheckBox->setChecked( defaultGridChecked );
dialog.m_createSummaryEnsembleCheckBox->setChecked( defaultSummaryChecked );
dialog.updateEffectiveFilter();
dialog.clearFileList();
dialog.setOkButtonEnabled( false );
@@ -434,9 +438,7 @@ void RicImportGridAndSummaryEnsembleDialog::updateFileListWidget()
auto mode = ensembleGroupingMode();
auto ensembleLabel = []( const QString& name, int gridCount, int summaryCount )
{
return QString( "%1 (%2 grids, %3 summary cases)" ).arg( name ).arg( gridCount ).arg( summaryCount );
};
{ return QString( "%1 (%2 grids, %3 summary cases)" ).arg( name ).arg( gridCount ).arg( summaryCount ); };
if ( mode == RiaDefines::EnsembleGroupingMode::NONE )
{
@@ -547,7 +549,6 @@ RiaDefines::EnsembleGroupingMode RicImportGridAndSummaryEnsembleDialog::ensemble
return RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -55,7 +55,7 @@ class RicImportGridAndSummaryEnsembleDialog : public QDialog
Q_OBJECT
public:
static RicImportGridAndSummaryEnsembleDialogResult runDialog( QWidget* parent );
static RicImportGridAndSummaryEnsembleDialogResult runDialog( QWidget* parent, bool defaultGridChecked, bool defaultSummaryChecked );
private:
explicit RicImportGridAndSummaryEnsembleDialog( QWidget* parent );
@@ -0,0 +1,126 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicImportGridAndSummaryEnsembleFeature.h"
#include "RiaGuiApplication.h"
#include "Summary/RiaSummaryPlotTools.h"
#include "RicImportGridAndSummaryEnsembleDialog.h"
#include "RicNewViewFeature.h"
#include "EnsembleFileSet/RimEnsembleFileSetTools.h"
#include "Rim3dView.h"
#include "RimReservoirGridEnsemble.h"
#include "RimSummaryEnsemble.h"
#include "RimViewNameConfig.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
#include <QAction>
#include <QIcon>
#include <QSet>
#include <QTimer>
CAF_CMD_SOURCE_INIT( RicImportGridAndSummaryEnsembleFeature, "RicImportGridAndSummaryEnsembleFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicImportGridAndSummaryEnsembleFeature::onActionTriggered( bool isChecked )
{
QPointer<QWidget> activeWindowBeforeImport = RiaGuiApplication::widgetToUseAsParent();
bool startedFromPlotWindow = ( RiaGuiApplication::activeMainWindow() == RiaGuiApplication::instance()->mainPlotWindow() );
auto result = RicImportGridAndSummaryEnsembleDialog::runDialog( activeWindowBeforeImport, !startedFromPlotWindow, startedFromPlotWindow );
if ( !result.ok ) return;
if ( !result.createGridEnsemble && !result.createSummaryEnsemble ) return;
// Build the union of base paths (extension-stripped) from both lists so every realization
// appears exactly once. findPathPattern requires each realization number to be unique across
// the input; duplicating paths with different extensions breaks the pattern detection.
auto stripExtension = []( const QString& path ) -> QString
{
int dot = path.lastIndexOf( '.' );
return dot != -1 ? path.left( dot ) : path;
};
QStringList strippedPaths;
for ( const auto& f : result.gridFiles )
strippedPaths << stripExtension( f );
for ( const auto& f : result.summaryFiles )
strippedPaths << stripExtension( f );
strippedPaths.removeDuplicates();
if ( strippedPaths.isEmpty() ) return;
auto fileSets = RimEnsembleFileSetTools::createEnsembleFileSets( strippedPaths, result.groupingMode );
if ( fileSets.empty() ) return;
bool gridEnsemblesCreated = false;
if ( result.createGridEnsemble && !result.gridFiles.isEmpty() )
{
auto gridEnsembles = RimEnsembleFileSetTools::createGridEnsemblesFromFileSets( fileSets );
if ( !gridEnsembles.empty() )
{
gridEnsemblesCreated = true;
auto firstEnsemble = gridEnsembles.front();
auto cases = firstEnsemble->cases();
if ( !cases.empty() )
{
auto view = RicNewViewFeature::addReservoirView( cases.front(), nullptr, firstEnsemble->viewCollection() );
if ( view ) view->nameConfig()->setAddCaseName( true );
}
}
}
if ( result.createSummaryEnsemble && !result.summaryFiles.isEmpty() )
{
auto summaryEnsembles = RimEnsembleFileSetTools::createSummaryEnsemblesFromFileSets( fileSets );
for ( auto ensemble : summaryEnsembles )
{
RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } );
}
if ( !summaryEnsembles.empty() ) RiuPlotMainWindowTools::showPlotMainWindow();
}
if ( gridEnsemblesCreated && activeWindowBeforeImport )
{
QTimer::singleShot( 500,
activeWindowBeforeImport,
[activeWindowBeforeImport]()
{
activeWindowBeforeImport->raise();
activeWindowBeforeImport->activateWindow();
} );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicImportGridAndSummaryEnsembleFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/GridAndSummaryEnsemble.svg" ) );
actionToSetup->setText( "Grid and Summary Ensemble" );
}
@@ -0,0 +1,33 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
class RicImportGridAndSummaryEnsembleFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};
@@ -770,9 +770,7 @@ void RicRecursiveFileSearchDialog::setCheckedStateChildItems( QStandardItem* par
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicRecursiveFileSearchDialog::findItemsMatching( QStandardItem* parentItem,
const QString& substring,
QList<QStandardItem*>& matchingItems )
void RicRecursiveFileSearchDialog::findItemsMatching( QStandardItem* parentItem, const QString& substring, QList<QStandardItem*>& matchingItems )
{
if ( !parentItem ) return;
for ( int i = 0; i < parentItem->rowCount(); ++i )
@@ -103,6 +103,7 @@ std::vector<RimReservoirGridEnsemble*> createGridEnsemblesFromFileSets( const st
project->assignIdToCaseGroup( ensemble );
eclipseCaseColl->reservoirGridEnsembles.push_back( ensemble );
ensemble->createGridCasesFromEnsembleFileSet();
ensemble->loadDataAndUpdate();
ensembles.push_back( ensemble );
}
@@ -482,6 +482,14 @@ RimEclipseView* RimReservoirGridEnsemble::addViewForCase( RimEclipseCase* eclips
return m_viewCollection->addView( eclipseCase );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseViewCollection* RimReservoirGridEnsemble::viewCollection() const
{
return m_viewCollection;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -106,6 +106,7 @@ public:
RimEclipseView* addViewForCase( RimEclipseCase* eclipseCase );
std::vector<RimEclipseView*> allViews() const;
std::set<RimEclipseCase*> casesInViews() const override;
RimEclipseViewCollection* viewCollection() const;
// Well target mapping
void addWellTargetMapping( RimWellTargetMapping* wellTargetMapping );
@@ -594,6 +594,8 @@ void RiuMainWindow::createToolBars()
QToolBar* toolbar = addToolBar( tr( "Standard" ) );
toolbar->setObjectName( toolbar->windowTitle() );
toolbar->addAction( cmdFeatureMgr->action( "RicImportEclipseCaseFeature" ) );
toolbar->addAction( cmdFeatureMgr->action( "RicImportGridAndSummaryEnsembleFeature" ) );
toolbar->addSeparator();
toolbar->addAction( cmdFeatureMgr->action( "RicOpenProjectFeature" ) );
toolbar->addAction( cmdFeatureMgr->action( "RicSaveProjectFeature" ) );
}
@@ -123,6 +123,9 @@ void RiuMenuBarBuildTools::addImportMenuWithActions( QObject* parent, QMenu* men
QMenu* importRoffMenu = importMenu->addMenu( QIcon( ":/Case48x48.png" ), "Roff Grid Models" );
importRoffMenu->addAction( cmdFeatureMgr->action( "RicImportRoffCaseFeature" ) );
importMenu->addSeparator();
importMenu->addAction( cmdFeatureMgr->action( "RicImportGridAndSummaryEnsembleFeature" ) );
importMenu->addSeparator();
QMenu* importSummaryMenu = importMenu->addMenu( QIcon( ":/SummaryCase.svg" ), "Summary Cases" );
importSummaryMenu->addAction( cmdFeatureMgr->action( "RicImportSummaryCaseFeature" ) );
@@ -393,7 +393,9 @@ QStringList RiuPlotMainWindow::toolbarCommandIds( const QString& toolbarName )
{
commandIds << "RicImportEclipseCaseFeature";
commandIds << "RicImportSummaryCaseFeature";
commandIds << "RicImportGridAndSummaryEnsembleFeature";
commandIds << "RicImportEnsembleFeature";
commandIds << "Separator";
commandIds << "RicOpenProjectFeature";
commandIds << "RicSaveProjectFeature";
}
@@ -440,7 +442,14 @@ void RiuPlotMainWindow::createToolBars()
QStringList toolbarCommands = toolbarCommandIds( toolbarName );
for ( QString s : toolbarCommands )
{
toolbar->addAction( cmdFeatureMgr->action( s ) );
if ( s.compare( "separator", Qt::CaseInsensitive ) == 0 )
{
toolbar->addSeparator();
}
else
{
toolbar->addAction( cmdFeatureMgr->action( s ) );
}
}
if ( toolbarName == "View" )
{