mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2535 Use the MainWindowTools class instead of MainWindow directly (part 4)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -50,7 +50,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATHFORMATIONS_DIR");
|
||||
QStringList wellPathFormationsFilePaths =
|
||||
QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Picks", defaultDir,
|
||||
QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Picks", defaultDir,
|
||||
"Well Picks (*.csv);;All Files (*.*)");
|
||||
|
||||
if (wellPathFormationsFilePaths.size() < 1)
|
||||
@@ -80,7 +80,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -50,7 +50,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
|
||||
if (wellPathFilePaths.size() < 1) return;
|
||||
|
||||
@@ -73,7 +73,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RicWellPathsUnitSystemSettingsUi.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
@@ -35,7 +35,7 @@ bool RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem(RimWellPath * wellP
|
||||
}
|
||||
|
||||
RicWellPathsUnitSystemSettingsUi settings;
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &settings, "Select Unit System for Well Path", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &settings, "Select Unit System for Well Path", "");
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
wellPath->setUnitSystem(settings.unitSystem());
|
||||
|
||||
Reference in New Issue
Block a user