aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-26 07:02:50 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-26 07:53:37 +0200
commit511716ea4e7c9034fbc38f208db5041107f76ee7 (patch)
tree2ca1bd5c35f8038ba17e634c7f5d7e36422b9b71 /external
parent22aa3cb4f4722e9f73f5a4c8bba82e304e5a9205 (diff)
Fix page scroll when navigating 4chan replies
Diffstat (limited to 'external')
-rw-r--r--external/RoundedRectangleShape.cpp7
1 files changed, 5 insertions, 2 deletions
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();
+ }
}
////////////////////////////////////////////////////////////