Disable use of the WindowsFileDialog class
On Windows, use: - QtFileDialog if FG was built with Qt support; - PUIFileDialog otherwise. Behavior on other platforms is unchanged. This change is motivated by the fact that some Windows users have reported[1][2] weird, non-deterministic behavior of WindowsFileDialog and unfortunately, no one seems to be willing and able to fix the problem. The Qt implementation comes for free and should be quite robust. Of course, if someone wants to maintain the WindowsFileDialog class again, the change can be reverted. See discussion at [3]. [1] https://forum.flightgear.org/viewtopic.php?f=25&t=31945 [2] https://sourceforge.net/p/flightgear/mailman/message/35761650/ [3] https://sourceforge.net/p/flightgear/mailman/message/35759819/
This commit is contained in:
parent
7f59846644
commit
4dc2e4fc09
1 changed files with 2 additions and 7 deletions
|
@ -38,9 +38,6 @@
|
|||
#include "CocoaFileDialog.hxx"
|
||||
#endif
|
||||
|
||||
#if defined(SG_WINDOWS)
|
||||
#include "WindowsFileDialog.hxx"
|
||||
#endif
|
||||
#if defined(HAVE_QT)
|
||||
#include "QtFileDialog.hxx"
|
||||
#endif
|
||||
|
@ -146,17 +143,15 @@ typedef nasal::Ghost<FileDialogPtr> NasalFileDialog;
|
|||
static naRef f_createFileDialog(const nasal::CallContext& ctx)
|
||||
{
|
||||
FGFileDialog::Usage usage = (FGFileDialog::Usage) ctx.requireArg<int>(0);
|
||||
|
||||
|
||||
#if defined(SG_MAC)
|
||||
FileDialogPtr fd(new CocoaFileDialog(usage));
|
||||
#elif defined(SG_WINDOWS)
|
||||
FileDialogPtr fd(new WindowsFileDialog(usage));
|
||||
#elif defined(HAVE_QT)
|
||||
FileDialogPtr fd(new QtFileDialog(usage));
|
||||
#else
|
||||
FileDialogPtr fd(new PUIFileDialog(usage));
|
||||
#endif
|
||||
|
||||
|
||||
return ctx.to_nasal(fd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue