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 6, 2023
1 parent f93e1a9 commit bcf3722
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/geometry/qgsrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,12 @@ class CORE_EXPORT QgsRectangle
*/
bool operator==( const QgsRectangle &r1 ) const
{
return qgsDoubleNear( r1.xMaximum(), xMaximum() ) &&
qgsDoubleNear( r1.xMinimum(), xMinimum() ) &&
qgsDoubleNear( r1.yMaximum(), yMaximum() ) &&
qgsDoubleNear( r1.yMinimum(), yMinimum() );
return isNull() == r1.isNull() || (
qgsDoubleNear( r1.xMaximum(), xMaximum() ) &&
qgsDoubleNear( r1.xMinimum(), xMinimum() ) &&
qgsDoubleNear( r1.yMaximum(), yMaximum() ) &&
qgsDoubleNear( r1.yMinimum(), yMinimum() )
);
}

/**
Expand Down

0 comments on commit bcf3722

Please sign in to comment.