From e8b69cd58cf19dd74a149db6d2218e7e4f42c46d Mon Sep 17 00:00:00 2001 From: Daid Date: Mon, 22 Jul 2024 18:46:55 +0200 Subject: [PATCH] Fix that setting a UV on an image widget would not update it --- include/sp2/graphics/gui/widget/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sp2/graphics/gui/widget/image.h b/include/sp2/graphics/gui/widget/image.h index edc63f3..8a7dd44 100644 --- a/include/sp2/graphics/gui/widget/image.h +++ b/include/sp2/graphics/gui/widget/image.h @@ -15,7 +15,7 @@ class Image : public Widget virtual void setAttribute(const string& key, const string& value) override; virtual void updateRenderData() override; - void setUV(sp::Rect2d uv_rect) { uv = uv_rect; } + void setUV(sp::Rect2d uv_rect) { if (uv.position != uv_rect.position || uv.size != uv_rect.size) { uv = uv_rect; markRenderDataOutdated(); } } private: string texture; Rect2d uv;