From fe280ab103abb7a5594e61ed9f2aaf5886d5e5d7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 3 May 2017 14:24:23 -0700 Subject: [PATCH] remember the browse directory for model baker --- tools/oven/src/ui/ModelBakeWidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/oven/src/ui/ModelBakeWidget.cpp b/tools/oven/src/ui/ModelBakeWidget.cpp index 7f2a0c74b5..c696fbad26 100644 --- a/tools/oven/src/ui/ModelBakeWidget.cpp +++ b/tools/oven/src/ui/ModelBakeWidget.cpp @@ -119,12 +119,15 @@ void ModelBakeWidget::chooseFileButtonClicked() { // set the contents of the model file text box to be the path to the selected file _modelLineEdit->setText(selectedFiles.join(',')); - if (_outputDirLineEdit->text().isEmpty()) { - auto directoryOfModel = QFileInfo(selectedFiles[0]).absolutePath(); + auto directoryOfModel = QFileInfo(selectedFiles[0]).absolutePath(); + if (_outputDirLineEdit->text().isEmpty()) { // if our output directory is not yet set, set it to the directory of this model _outputDirLineEdit->setText(directoryOfModel); } + + // save the directory containing the file(s) so we can default to it next time we show the file dialog + _modelStartDirectory.set(directoryOfModel); } }