FileBasedDocument::save /saveAs - how do i make them point to path of most recent file?


#1

Hi!

Upon starting the application, if I create something and then press save/saveAs, I'm pointed to the user's default documents directory.

But, when I press Load, I am ponted to the folder where I saved a file last time I ran the application.

It would make a lot of sense that also Save and SaveAs point to that directory, but there doesn't seem to be a way of doing this.

Passing the previous path as an argument to the methods directly just asks me if I want to overwrite the folder - which is also incorrect, since it is a folder, not a file!

How could I do this?

Thank you!


#2

What about the whole get/setLastDocumentOpened stuff?


#3

That did it, thank you!