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

Don't show invalid "Style not found in database" warning when adding vector tile layers #57714

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

nyalldawson
Copy link
Collaborator

The API here is a mess -- since we use the same API for user-triggered intentional style loads and ALSO the attempt to sniff and see if a layer has a default style (when it may not), there's a mixup of whether or not we should report missing styles as an error or not.

This results in a misleading "style not found in database" error shown when adding vector tile layers. Other layer types just ignore the return code and don't show warnings, but for vector tiles the API returns valid warnings when loading styles which we DO want to be user visible.

Just hack around this by hiding the one particular unwanted warning for now.

@github-actions github-actions bot added this to the 3.38.0 milestone Jun 8, 2024
Copy link

github-actions bot commented Jun 8, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit ec29245)

@m-kuhn
Copy link
Member

m-kuhn commented Jun 9, 2024

Would an additional param bool ifPresent = false be cleaner?

…vector tile layers

The API here is a mess -- since we use the same API for user-triggered
intentional style loads and ALSO the attempt to sniff and see if a layer
has a default style (when it may not), there's a mixup of whether
or not we should report missing styles as an error or not.

This results in a misleading "style not found in database" error
shown when adding vector tile layers. Other layer types just ignore
the return code and don't show warnings, but for vector tiles the
API returns valid warnings when loading styles which we DO want
to be user visible.

Just hack around this by hiding the one particular unwanted warning
for now.
We can't fix the API without a significant break here.
@nyalldawson
Copy link
Collaborator Author

@m-kuhn

Would an additional param bool ifPresent = false be cleaner?

I've done what I can with the API now, but we can't fix the ultimate issues until QGIS 4.0. Lots of TODOs added now 😉

@m-kuhn
Copy link
Member

m-kuhn commented Jun 10, 2024

Thanks @nyalldawson !

@nyalldawson nyalldawson merged commit c7e3ff0 into qgis:master Jun 10, 2024
30 checks passed
@nyalldawson nyalldawson deleted the invalid_warn branch June 10, 2024 09:54
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.

None yet

2 participants