-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Some fixes in measure 3d #60849
base: master
Are you sure you want to change the base?
Some fixes in measure 3d #60849
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
src/3d/qgsrubberband3d.cpp
Outdated
@@ -140,6 +140,32 @@ void QgsRubberBand3D::setupPolygon( Qt3DCore::QEntity *parentEntity ) | |||
mPolygonEntity->addComponent( mPolygonMaterial ); | |||
} | |||
|
|||
void QgsRubberBand3D::removePoint( int index ) | |||
{ | |||
if ( QgsPolygon *polygon = qgsgeometry_cast<QgsPolygon *>( mGeometry.constGet() ) ) |
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.
You're abusing API here. You're using constGet(), but then modifying the geometry! 😱
Bit this points out a bad issue -- you shouldn't be allowed to qgsgeometry_cast a const geometry pointer to a non-const one. PR incoming...
Description