Riverscapes / QRAVEPlugin

QGIS Plugin for viewing Riverscapes projects
0 stars 0 forks source link

Remembering the Last Project Folder #44

Closed philipbaileynar closed 2 years ago

philipbaileynar commented 2 years ago

The Problem

It's annoying that each new QGIS session, the first time you click the open project button the file browser dialog defaults to some system folder.

Requested Feature

Every time that clicking the open project button results in a selected project file (i.e. not when the user cancels the browser dialog) it would be helpful if QRAVE stores the "last used project folder". This last used project folder is then used to initialized the browser dialog (remembering to check if the value is not NULL (i.e. no value has been stored yet) and the folder still exists).

I do this in every .net app for any kind of file browsing operation (arcRAVE example). It's a tiny tiny tiny help to the user that saves a TON of time (typically without them even knowing). It's especially valuable in RAVE because most folks have a dedicated top level folder on their hard drive where they store all their downloaded projects. Getting back to this top level folder every session is annoying.

I recognize that we are talking about Qt on multiple operating systems, which complicates this feature. But I think we store other software level settings and I'm hopeful we can similarly store the last used project folder.

(FWIW Subsequent clicks of the open project button do launch the browser dialog at the last browsed folder).

MattReimer commented 2 years ago

The issue is that the setting is stored in the wrong domain. If we store it at the qgis level and not the plugin level it should work.

MattReimer commented 2 years ago

Ah, this was easy. I was already reading the setting but I'd forgotten to write to it.