[Qgis-developer] Native file dialog bugs and the new Save As Vector functionality.

Borys Jurgiel borysiasty at aster.pl
Fri Mar 19 09:29:26 EDT 2010


Hi all,
The native file dialogs in KDE 4.4 (and afair 4.3 too) seem to contain some
bugs. The most serious bug is broken file type selector: the &selectedFilter
pointer doesn't interact with the selector.

It means that in all native file dialogs the file type filter is initially set always
to the first item, ignoring the last used value stored in QSettings. But the
new Save As Vector functionality is completely broken, as the file format 
is not fetched from the selector and the layer is always saved as Shapefile.

Besides of that, there are also some minor but irritating bugs in the native
version, while everything works perfectly with non-native Qt4 dialog.

So the first suggestion is to set the non-native dialog until the bug in KDE
is fixed:

-  QString outputFile = QFileDialog::getSaveFileName( 0, tr( "Save layer as..." ), dirName, filterString, &selectedFilter );
+  QString outputFile = QFileDialog::getSaveFileName( 0, tr( "Save layer as..." ), dirName, filterString, &selectedFilter, QFileDialog::DontUseNativeDialog )

The second idea is to go further and use our custom dialog with the encoding
field and also add a CRS selector: a field with default value (the present 
layer CRS) and a button to call the big CRS dialog only if needed.


What do you think? Not long ago we switched to the native version in the Open
Vector dialog, so I'm not so hurry to make an opposite change here. But in fact
I prefer one dialog with encoding and CRS fields rather than the present sequence
of the two dialogs.


More information about the Qgis-developer mailing list