Skip to content

Commit

Permalink
Have QgsRectangle::snappedToGrid return a copy of self for Null rects
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Oct 8, 2023
1 parent c07896b commit 3f471a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/geometry/qgsrectangle.cpp
Expand Up @@ -193,6 +193,8 @@ QgsBox3D QgsRectangle::toBox3d( double zMin, double zMax ) const

QgsRectangle QgsRectangle::snappedToGrid( double spacing ) const
{
if ( isNull() ) return *this;

// helper function
auto gridifyValue = []( double value, double spacing ) -> double
{
Expand Down

0 comments on commit 3f471a7

Please sign in to comment.