Skip to content

Commit

Permalink
Always consider two null rectangles as equal
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Oct 8, 2023
1 parent bcf83c1 commit 8f71633
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/geometry/qgsrectangle.h
Expand Up @@ -521,6 +521,8 @@ class CORE_EXPORT QgsRectangle
*/
bool operator==( const QgsRectangle &r1 ) const
{
if ( isNull() ) return r1.isNull();

return qgsDoubleNear( r1.xMaximum(), xMaximum() ) &&
qgsDoubleNear( r1.xMinimum(), xMinimum() ) &&
qgsDoubleNear( r1.yMaximum(), yMaximum() ) &&
Expand Down

0 comments on commit 8f71633

Please sign in to comment.