insilmaril / vym

View Your Mind
https://sourceforge.net/projects/vym/
Other
139 stars 33 forks source link

Remember working directory #98

Closed slmeyer closed 1 month ago

slmeyer commented 6 months ago

Feature request: When save, save as or open, suggest or use the working directory as default. Working directory being either last directory use by the save function or the last one used by the open function

insilmaril commented 6 months ago

Hint for implementing: Use

lastImageDir lastMapDir

defined here: https://github.com/insilmaril/vym/blob/de0b06b3649a9369a7af2fe433749982071e15a2/src/main.cpp#L83

Bleyddyn commented 2 months ago

As far as I can tell, code for this is already in there. It was added with commits 1b3e6db3d and eb6e224e2. I tested a couple of simple open, save and save-as actions and they seemed to work. The very first time I saved I was given my home directory. After that the dialogs defaulted to whatever directory I had last used. That includes the dialog for choosing a local url for a map entry.

I'd be glad to work on this issue if there's anything left to do, but I will probably need a description of how to test it, if it's something more complicated than I described.

slmeyer commented 2 months ago

Thanks, I open Vym, and then as you say if I open a map it defaults to home directory. I chose to open a recent map. Then when I save_as i still defaults to homedir. After I chose my worling directory to save_as to, then next time it again defaults to homedir. Only when I open a map (with the 'open' dialog) does it remember the directory when I want to open another or save_as. I would almost alway chose to open a recent one and then save_as - and then it does not learn, which would be nice, thanks.

slmeyer commented 2 months ago

Version 2.9.26 Quality: Production Build date: 2023-11-23

Bleyddyn commented 2 months ago

Got it. I think I fixed some or all of this while I was trying to test another issue. I'll look into it a bit more.

insilmaril commented 1 month ago

I think with Bleyddyns patch we have most corners covered now to set lastMapDir when loading/saving data.

Please note I merged only to develop. The next generation vym is already pretty stable, but so far I have not yet built binaries.