#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 RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
{
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->defaultFileDialogDirectory("WELLPATH_DIR");
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 (*.*)");
if (wellPathFilePaths.size() < 1) return;
// Remember the path to next time
app->setDefaultFileDialogDirectory("WELLPATH_DIR", QFileInfo(wellPathFilePaths.last()).absolutePath());
app->setLastUsedDialogDirectory("WELLPATH_DIR", QFileInfo(wellPathFilePaths.last()).absolutePath());
app->addWellPathsToModel(wellPathFilePaths);
if (app->project())