IGUIFileOpenDialog changes current working directory

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
ceyron
Posts: 63
Joined: Tue Mar 03, 2009 5:10 pm
Location: Bucuresti, România

IGUIFileOpenDialog changes current working directory

Post by ceyron »

When selecting a file with the file open dialog the current working directory [device->getFileSystem()->getWorkingDirectory()] will be changed to that of the currently selected file.

I do not know if this is the intended behaviour, but i found it very confusing when my configuration files where saved in a different place everytime i selected a new font. :?

Offtopic
Also a question for a dev, i am a little curious as to why a button for example doesn't serialize OverrideFont when i save the gui to file.
The line //out->addString("OverrideFont",OverrideFont); has been commented out in CGUIButton::serializeAttributes(), didn't it work? or do you have plans to include the setOverrideFont() method in IGUIElement and serialize that there?
I ask because i'm developing a gui editor for irrlicht and saving all the attributes of an element to file will be very helpfull to me.
Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Yeah, changing working-directory is annoying, but probably was intended (it seems to be the same behaviour as the FileOpenDialog in Windows has).

And font-serialization is currently not used because we need a better serialization system for fonts (as well as for skins, particle-emitters and particle-attractors) or we can't handle custom-fonts with parameters. If we have no better solution before releasing 1.8 I will probably add font-names as strings as workaround.
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
ceyron
Posts: 63
Joined: Tue Mar 03, 2009 5:10 pm
Location: Bucuresti, România

Post by ceyron »

Ok, thanks for your answer...you could update the documentation to specify that it will change the working directory :wink:
Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

ceyron wrote:Ok, thanks for your answer...you could update the documentation to specify that it will change the working directory :wink:
Ok, I did that.
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
Post Reply