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

Resurrect display of interpolated z/m in identify results #7607

Merged
merged 4 commits into from
Aug 14, 2018

Conversation

nyalldawson
Copy link
Collaborator

Fixes https://issues.qgis.org/issues/19403, and adds tests

@@ -374,6 +374,25 @@ void QgsMapToolIdentify::closestVertexAttributes( const QgsAbstractGeometry &geo
}
}

void QgsMapToolIdentify::closestPointAttributes( const QgsAbstractGeometry &geometry, const QgsPointXY &layerPoint, QMap<QString, QString> &derivedAttributes )
{
QgsPoint closestPoint = QgsGeometryUtils::closestPoint( geometry, QgsPoint( layerPoint.x(), layerPoint.y() ) );
Copy link
Member

@m-kuhn m-kuhn Aug 14, 2018

Choose a reason for hiding this comment

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

Should we have a QgsPoint::toPointXY method and vice versa.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually there's already QgsPointXY( const QgsPoint &point ), I'll just use that

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we just want to remove the explicit part there for the direction QgsPointXY -> QgsPoint (and leave it for the other one)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Implicit conversions scare me 😨

Copy link
Member

Choose a reason for hiding this comment

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

Just look at it as upcasting ;)

QgsMapLayer* l = myVectorLayer; // ok
QgsVectorLayer* l = myMapLayer; // not gonna be that easy

@nyalldawson nyalldawson merged commit 6fcc162 into qgis:master Aug 14, 2018
@nyalldawson nyalldawson deleted the fix_19403 branch August 14, 2018 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants