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
Fix histogram bindings #30033
Fix histogram bindings #30033
Conversation
Hopfully fixes qgis#29700
@@ -378,8 +378,8 @@ class CORE_EXPORT QgsRasterInterface | |||
maximum = PyFloat_AsDouble( a3 ); | |||
} | |||
|
|||
QgsRasterHistogram h = sipCpp->histogram( a0, a1, minimum, maximum, *a4, a5, a6, a7 ); | |||
sipRes = &h; | |||
QgsRasterHistogram *h = new QgsRasterHistogram( sipCpp->histogram( a0, a1, minimum, maximum, *a4, a5, a6, a7 ) ); |
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.
Doesn't this need wrapping in "sipConvertFromType" ?
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.
@nyalldawson please have a look to my last commit.
Is it worth adding a python test for this method? Is there an existing one? Gut feeling is that there's likely NO tests for this method, it predates the focus on stability. |
I'll see what I can do. |
Fwd port of PR qgis#30033 Fixes qgis#29700 With a new test for the bug.
Hopefully fixes #29700