From e06de21e88d83553acbe20574ef9dab76d34d44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Fri, 19 Oct 2018 12:40:52 +0200 Subject: [PATCH] #3494 LGR export. Set correct dialog title --- .../Commands/ExportCommands/RicExportLgrFeature.cpp | 6 +++--- .../Commands/ExportCommands/RicExportLgrFeature.h | 2 +- ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp index 7403fa4598..1550583856 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.cpp @@ -62,7 +62,7 @@ CAF_CMD_SOURCE_INIT(RicExportLgrFeature, "RicExportLgrFeature"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicExportLgrUi* RicExportLgrFeature::openDialog(RimEclipseCase* defaultCase, int defaultTimeStep) +RicExportLgrUi* RicExportLgrFeature::openDialog(const QString& dialogTitle, RimEclipseCase* defaultCase, int defaultTimeStep) { RiaApplication* app = RiaApplication::instance(); RimProject* proj = app->project(); @@ -97,7 +97,7 @@ RicExportLgrUi* RicExportLgrFeature::openDialog(RimEclipseCase* defaultCase, int if (defaultCase) featureUi->setCase(defaultCase); featureUi->setTimeStep(defaultTimeStep); - caf::PdmUiPropertyViewDialog propertyDialog(nullptr, featureUi, "LGR Export", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + caf::PdmUiPropertyViewDialog propertyDialog(nullptr, featureUi, dialogTitle, "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel); propertyDialog.resize(QSize(600, 275)); if (propertyDialog.exec() == QDialog::Accepted && !featureUi->exportFolder().isEmpty()) @@ -354,7 +354,7 @@ void RicExportLgrFeature::onActionTriggered(bool isChecked) defaultTimeStep = activeView->currentTimeStep(); } - auto dialogData = openDialog(defaultEclipseCase, defaultTimeStep); + auto dialogData = openDialog("LGR Export", defaultEclipseCase, defaultTimeStep); if (dialogData) { auto eclipseCase = dialogData->caseToApply(); diff --git a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h index 9cba6cc170..cd94b82a84 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h +++ b/ApplicationCode/Commands/ExportCommands/RicExportLgrFeature.h @@ -83,7 +83,7 @@ class RicExportLgrFeature : public caf::CmdFeature typedef std::pair Range; static Range initRange() { return std::make_pair(std::numeric_limits::max(), 0); } - static RicExportLgrUi* openDialog(RimEclipseCase* defaultCase = nullptr, int defaultTimeStep = 0); + static RicExportLgrUi* openDialog(const QString& dialogTitle, RimEclipseCase* defaultCase = nullptr, int defaultTimeStep = 0); static bool openFileForExport(const QString& folderName, const QString& fileName, QFile* exportFile); static void exportLgrs(QTextStream& stream, const std::vector& lgrInfos); diff --git a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp index a29ea3659c..27028d7382 100644 --- a/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp +++ b/ApplicationCode/Commands/RicCreateTemporaryLgrFeature.cpp @@ -95,7 +95,7 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked) defaultTimeStep = activeView->currentTimeStep(); } - auto dialogData = RicExportLgrFeature::openDialog(defaultEclipseCase, defaultTimeStep); + auto dialogData = RicExportLgrFeature::openDialog(dialogTitle, defaultEclipseCase, defaultTimeStep); if (dialogData) { auto eclipseCase = dialogData->caseToApply();