1
0
Fork 0

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:
Florent Rougon 2017-05-04 09:49:10 +02:00
parent 7f59846644
commit 4dc2e4fc09

View file

@ -38,9 +38,6 @@
#include "CocoaFileDialog.hxx" #include "CocoaFileDialog.hxx"
#endif #endif
#if defined(SG_WINDOWS)
#include "WindowsFileDialog.hxx"
#endif
#if defined(HAVE_QT) #if defined(HAVE_QT)
#include "QtFileDialog.hxx" #include "QtFileDialog.hxx"
#endif #endif
@ -149,8 +146,6 @@ static naRef f_createFileDialog(const nasal::CallContext& ctx)
#if defined(SG_MAC) #if defined(SG_MAC)
FileDialogPtr fd(new CocoaFileDialog(usage)); FileDialogPtr fd(new CocoaFileDialog(usage));
#elif defined(SG_WINDOWS)
FileDialogPtr fd(new WindowsFileDialog(usage));
#elif defined(HAVE_QT) #elif defined(HAVE_QT)
FileDialogPtr fd(new QtFileDialog(usage)); FileDialogPtr fd(new QtFileDialog(usage));
#else #else