mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4951 Summary Plot Template : Hide default plot template from UI
This commit is contained in:
@@ -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"
|
||||
@@ -335,6 +336,9 @@ QString RicSummaryPlotTemplateTools::selectPlotTemplatePath()
|
||||
{
|
||||
QString fileName = ui->selectedPlotTemplates().front()->absoluteFilePath();
|
||||
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user