#882 RiaApplication : Renamed to lastUsedDialogDirectory and added currentProjectPath. Use project path as fallback path for LAS export

This commit is contained in:
Magne Sjaastad
2016-09-21 09:46:17 +02:00
parent ae6397c5c6
commit 33abbed1fd
15 changed files with 84 additions and 65 deletions

View File

@@ -46,13 +46,13 @@ void RicWellLogsImportFileFeature::onActionTriggered(bool isChecked)
{
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->defaultFileDialogDirectory("WELL_LOGS_DIR");
QString defaultDir = app->lastUsedDialogDirectory("WELL_LOGS_DIR");
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
if (wellLogFilePaths.size() < 1) return;
// Remember the path to next time
app->setDefaultFileDialogDirectory("WELL_LOGS_DIR", QFileInfo(wellLogFilePaths.last()).absolutePath());
app->setLastUsedDialogDirectory("WELL_LOGS_DIR", QFileInfo(wellLogFilePaths.last()).absolutePath());
app->addWellLogsToModel(wellLogFilePaths);
}