mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove obsolete template commands (#8851)
* Remove obsolete template commands Use first object in object list when creating plots for templates and a case is selected. (use first well in well list, first group in group list, ...) * Always create the reference string
This commit is contained in:
@@ -23,11 +23,10 @@
|
||||
|
||||
#include "RicSummaryPlotTemplateTools.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFile>
|
||||
@@ -40,10 +39,7 @@ CAF_CMD_SOURCE_INIT( RicCreatePlotFromTemplateByShortcutFeature, "RicCreatePlotF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreatePlotFromTemplateByShortcutFeature::isCommandEnabled()
|
||||
{
|
||||
bool anySummaryCases = !RicSummaryPlotTemplateTools::selectedSummaryCases().empty();
|
||||
bool anySummaryCaseCollections = !RicSummaryPlotTemplateTools::selectedSummaryCaseCollections().empty();
|
||||
|
||||
return ( anySummaryCases || anySummaryCaseCollections );
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -70,11 +66,9 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck
|
||||
fileName = fileNameSelectedInUi;
|
||||
}
|
||||
|
||||
auto sumCases = RicSummaryPlotTemplateTools::selectedSummaryCases();
|
||||
auto sumCaseCollections = RicSummaryPlotTemplateTools::selectedSummaryCaseCollections();
|
||||
auto newSummaryPlot = RicSummaryPlotTemplateTools::create( fileName );
|
||||
|
||||
RimSummaryPlot* newSummaryPlot = RicSummaryPlotTemplateTools::createPlotFromTemplateFile( fileName );
|
||||
RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection( newSummaryPlot, sumCases, sumCaseCollections );
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( newSummaryPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user