svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 7a2435b4ae52bbbe8bd7d0fd0cf6a32ee42aac98 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 2 14:03:55 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 2 19:42:00 2023 +0200 fix mistake in commit "optimise ensureGeometry" In commit bfe32f3e50b5406810e740ac41368f101033e766 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Jan 12 20:51:39 2022 +0200 optimise ensureGeometry I got the return value wrong for the early exit case. I am quite surprised this did not mess up something in the drawinglayer line handling. Change-Id: I6788ef8898575c89344f25f6e66c4ae0a999f013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 0b546cd34d5a..0c1ed2af250b 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -49,8 +49,9 @@ namespace sdr::contact for(auto const& rPolygon : std::as_const(rUnitPolyPolygon)) { nPointCount += rPolygon.count(); + // return early if we definitely have geometry if (nPointCount > 1) - return false; + return nPolyCount == 1; } if(!nPointCount)