remember the last LCP directory across RT restarts

This commit is contained in:
Alberto Griggio
2017-04-11 15:22:50 +02:00
parent b625eafb68
commit 63c57ca43c
3 changed files with 9 additions and 1 deletions

View File

@@ -48,7 +48,10 @@ LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("T
fcbLCPFile->set_show_hidden(true); // ProgramData is hidden on Windows
#endif
fcbLCPFile->set_current_folder(defDir);
} else if (!options.lastLensProfileDir.empty()) {
fcbLCPFile->set_current_folder(options.lastLensProfileDir);
}
bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir);
hbLCPFile->pack_start(*fcbLCPFile);
@@ -89,8 +92,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
fcbLCPFile->unselect_filename(fname);
} else {
Glib::ustring lastFolder = fcbLCPFile->get_current_folder();
fcbLCPFile->set_filename("");
fcbLCPFile->set_current_folder(lastFolder);
fcbLCPFile->set_filename(lastFolder + "/.");
bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir);
}
updateDisabled(false);