[bug] OpenFileDialog: unwanted behaviour

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

[bug] OpenFileDialog: unwanted behaviour

Post by REDDemon »

When I open a file with the "OpenFileDialog" the working directory is changed. This way the OpenFileDialog can "memorize" the last opened directory. But all others path are wrong.

If I Open a file and then I try to load some kind of assets the engine will crash because the assets will be not found due to changed working directory. And pointer to related resources will be null.

how to fix:

1) should at least warn in software documentation
2) maybe add a "secondary working directory" to FileSytem wich can be used by users and is used by OpenFileDialog
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [bug] OpenFileDialog: unwanted behaviour

Post by CuteAlien »

Yeah, I guess it should be documented (you're not the first running into this). My usual workaround is remembering old path and setting it back after closing. Default behavior should not change (always bad, and this way is also fine when documented), but having that optional would be good. I can add the documentation (got a bunch of other documentation fixes waiting anyway), fixing the dialog will have to wait (I have more than half a dozen change-wishes for this dialog already - it needs more or less a complete rework imho).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: [bug] OpenFileDialog: unwanted behaviour

Post by REDDemon »

yes i fixed in my project in the same way. (storing a secondary path elsewhere).
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Post Reply