IGUIFileOpenDialog doesn't close after picking a 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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

IGUIFileOpenDialog doesn't close after picking a directory

Post by StephenLynx »

I am running irrlicht 1.8.4 on centOS 7.
If I pick a directory with a IGUIFileOpenDialog, it will fire the event of a directory being picked but it won't close nor allow you to close it with the mouse.
If its created as a modal element, it won't free the GUI to be interacted with either.

You can manually remove the file chooser, though, calling it's "remove" method.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by CuteAlien »

You didn't grab() it?
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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by StephenLynx »

What do you mean?
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by CuteAlien »

If you did grab() it yourself additionally then you might keep the window intact (thought remove() should still work.. so that can't be it).

Does this happen if you try it in example 05 from Irrlicht?
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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by StephenLynx »

Yes, it does happen on example 5. You pick a directory and the file chooser won`t go away on it`s own.

A small update: it doesn`t seem to be completely locking up, even on my code. You can still use and close the choose with the mouse.
So that might have been a wrong observation on my part or my stack was corrupted at that point.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by CuteAlien »

OK - so select a directory and click on the OK button in the file-dialog and nothing happens? In example 05 - do you get any messages in the listbox (the one above the 3 buttons in the main window)? It should usually say at this point:
File open
EGET_FILE_SELECTED
your_directory_name.

I suspect you get the first line - but does any of the other 2 show up? (I'm trying to get some hint at which point this fails).
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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by StephenLynx »

Nothing happens, only "file opens" appear when the file choose is created.
Mind you, when you pick a directory, EGET_DIRECTORY_SELECTED is fired, not EGET_FILE_SELECTED.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by CuteAlien »

Ah right. Uhm... seems that was done deliberately - so users are supposed to chose files.
I guess the other one could be added as an option. As workaround - catch EGET_DIRECTORY_SELECTED and remove the dialog on that.

edit: Just found out I got that one on my todo already. One of many feature-wishes for that dialog *sigh*. I made the error last time starting with the hardest problem (never finished it), should do those simple features first next time I work on it.
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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by StephenLynx »

An useful feature would be to be able to create the chooser and tell it what to allow.
Like the mask for dialog boxes, where you tell which buttons are allowed by using bitwise ands.
0 = nothing, 1 = only files, 2 = only directories, 3 = both files and directories.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by CuteAlien »

What do we do on nothing? Gray out ok button? But yeah - that's basically what's missing. And another feature is to prevent directory switchign completely (not even showing the directories).
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
StephenLynx
Posts: 6
Joined: Sat Jan 28, 2017 2:01 pm

Re: IGUIFileOpenDialog doesn't close after picking a directo

Post by StephenLynx »

Yeah, do nothing, grey it out, IMO.
Use something like only files for default, if the programmer wants to override with a 0 and have a non-functioning chooser, that's his problem.
Post Reply