From 511716ea4e7c9034fbc38f208db5041107f76ee7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 26 Sep 2020 07:02:50 +0200 Subject: Fix page scroll when navigating 4chan replies --- external/RoundedRectangleShape.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'external') diff --git a/external/RoundedRectangleShape.cpp b/external/RoundedRectangleShape.cpp index 3dc3274..e56cf9f 100644 --- a/external/RoundedRectangleShape.cpp +++ b/external/RoundedRectangleShape.cpp @@ -39,8 +39,11 @@ RoundedRectangleShape::RoundedRectangleShape(const Vector2f& size, float radius, //////////////////////////////////////////////////////////// void RoundedRectangleShape::setSize(const Vector2f& size) { - mySize = size; - update(); + // Modified by dec05eba + if(std::abs(size.x - mySize.x) > 1.0f || std::abs(size.y - mySize.y) > 1.0f) { + mySize = size; + update(); + } } //////////////////////////////////////////////////////////// -- cgit v1.2.3