vym icon indicating copy to clipboard operation
vym copied to clipboard

Remember working directory

Open slmeyer opened this issue 2 years ago • 1 comments

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

slmeyer avatar Apr 05 '24 13:04 slmeyer

Hint for implementing: Use

lastImageDir lastMapDir

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

insilmaril avatar Apr 05 '24 16:04 insilmaril

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.

Bleyddyn avatar Jul 25 '24 19:07 Bleyddyn

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 avatar Jul 30 '24 19:07 slmeyer

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

slmeyer avatar Jul 30 '24 19:07 slmeyer

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.

Bleyddyn avatar Jul 31 '24 15:07 Bleyddyn

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.

insilmaril avatar Aug 08 '24 07:08 insilmaril