Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide symbology export options when not compatible #5473

Merged
merged 1 commit into from
Dec 11, 2017

Conversation

DelazJ
Copy link
Contributor

@DelazJ DelazJ commented Oct 27, 2017

In the vector layer "Save As..." dialog there are options to export features/layer with a symbology. From what i understood it has to do with OGR styles and apply to only some formats. But these options were always shown whatever the selected format.
The PR also hides the "select fields..." frame instead of simply disable it.

image

@@ -57,6 +57,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
mLayerExtent = layer->extent();
}
setup();

if ( !( options & Symbology ) )
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder what does return this condition as it seems to be never met

fieldsAsDisplayedValues = ( sFormat == QLatin1String( "CSV" ) || sFormat == QLatin1String( "XLS" ) || sFormat == QLatin1String( "XLSX" ) || sFormat == QLatin1String( "ODS" ) );
}

// Show symbology options only for some formats
if ( sFormat == QLatin1String( "DXF" ) || sFormat == QLatin1String( "KML" ) || sFormat == QLatin1String( "MapInfo File" ) || sFormat == QLatin1String( "MapInfo MIF" ) )
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a better way to list the concerned formats, i suppose

@nyalldawson
Copy link
Collaborator

Refs OSGeo/gdal#260

@rduivenvoorde
Copy link
Contributor

Ah, this always bugged me too! Thanks @DelazJ and @nyalldawson for working on this!

How to proceed now? Wait for the GDAL capability changes, and then use these too?
Or is this a 'feature' which has to wait untill 3.2?
(I always have seen this as a gui bug :- ) )

@DelazJ
Copy link
Contributor Author

DelazJ commented Dec 9, 2017

I don't know what are the plans but looks like we'll be waiting for gdal cleaner fix.

@nyalldawson nyalldawson merged commit 163a1f9 into qgis:master Dec 11, 2017
@nyalldawson
Copy link
Collaborator

cleaner fix is gdal >= 2.3 only, so this is acceptable for now

@DelazJ DelazJ deleted the saveas-symbology branch December 11, 2017 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants