mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Resinsight: Made Home path the default path for file dialog browsing, and added remembering of the last opened path.
Added -startdir command line argument to override the default file browse path p4#: 19263
This commit is contained in:
@@ -558,9 +558,17 @@ void RimUiTreeView::setModel(QAbstractItemModel* model)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimUiTreeView::slotAddInputProperty()
|
||||
{
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(this, "Select Eclipse Input Property Files", NULL, "All Files (*.* *)");
|
||||
RIApplication* app = RIApplication::instance();
|
||||
QString defaultDir = app->defaultFileDialogDirectory("INPUT_FILES");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(this, "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)");
|
||||
|
||||
if (fileNames.isEmpty()) return;
|
||||
|
||||
// Remember the directory to next time
|
||||
defaultDir = QFileInfo(fileNames.last()).absolutePath();
|
||||
app->setDefaultFileDialogDirectory("INPUT_FILES", defaultDir);
|
||||
|
||||
|
||||
QModelIndex index = currentIndex();
|
||||
RimUiTreeModelPdm* myModel = dynamic_cast<RimUiTreeModelPdm*>(model());
|
||||
caf::PdmUiTreeItem* uiItem = myModel->getTreeItemFromIndex(currentIndex());
|
||||
|
||||
Reference in New Issue
Block a user