-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 identify 3d layers when clicking the terrain #59790
base: master
Are you sure you want to change the base?
Conversation
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🪟 Windows buildsDownload Windows builds of this PR for testing. |
* \see restoreCanvasPropertiesOverrides() | ||
* \since QGIS 3.4 | ||
*/ | ||
void setCanvasPropertiesOverrides( double searchRadiusMapUnits ); | ||
void setCanvasPropertiesOverrides( double searchRadiusMapUnits, bool skip3DLayers = true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a bool argument, could you use a flag enum instead? That's a little more future proof and avoids the risk of multiple true, false, true
style arguments (and also the risk of accidental automatic int/double to bool conversion if arguments are specified in the wrong order)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future proofness, wouldn't it be better to replace parameters with a variant map, or better a simple CanvasPropertiesOverrides struct? The flag can only handle bool-ish parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be better to replace parameters with a variant map, or better a simple CanvasPropertiesOverrides struct? The flag can only handle bool-ish parameters
Not a variant map, cos that's extremely fragile -- but yes, a CanvasPropertiesOverrides struct would be even better. It's just more work vs a enum :)
77b3dfb
to
9c5900a
Compare
for more information, see https://pre-commit.ci
Description
Layers that have a 3d renderer set should only be identified by the 3d ray intersection test and not by the 2d identify tool on the point clicked on the terrain.