mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Merge pull request #4955 from OPM/summary-adjustments
Summary adjustments
This commit is contained in:
7 files changed
+10
-60
No files matched your search
+2
-4
@@ -58,8 +58,8 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck
|
||||
auto mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
|
||||
auto reply = QMessageBox::question( mainPlotWindow,
|
||||
QString( "No default plot template found." ),
|
||||
QString( "Do you want to define default plot template? " ),
|
||||
QString( "No last used plot template found." ),
|
||||
QString( "Do you want to select plot template? " ),
|
||||
QMessageBox::Yes | QMessageBox::No );
|
||||
|
||||
if ( reply == QMessageBox::No ) return;
|
||||
@@ -68,8 +68,6 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck
|
||||
if ( fileNameSelectedInUi.isEmpty() ) return;
|
||||
|
||||
fileName = fileNameSelectedInUi;
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
}
|
||||
|
||||
auto sumCases = RicSummaryPlotTemplateTools::selectedSummaryCases();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
|
||||
#include "RicSelectPlotTemplateUi.h"
|
||||
@@ -330,11 +331,15 @@ QString RicSummaryPlotTemplateTools::selectPlotTemplatePath()
|
||||
RicSelectPlotTemplateUi* ui = RiaGuiApplication::instance()->project()->dialogData()->selectPlotTemplateUi();
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( plotwindow, ui, "Select Plot Template", "" );
|
||||
propertyDialog.resize( QSize( 400, 600 ) );
|
||||
|
||||
if ( propertyDialog.exec() == QDialog::Accepted && !ui->selectedPlotTemplates().empty() )
|
||||
{
|
||||
QString fileName = ui->selectedPlotTemplates().front()->absoluteFilePath();
|
||||
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user