From 377d86c2be51e1eb98b442310807c34298aa867b Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Mon, 22 Jan 2024 22:40:06 +0100 Subject: [PATCH] Textures with different part rects were incorrectly considered equal, which caused replacing textures in renderers to fail if only the part rect differed --- changelog.md | 1 + src/Texture.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog.md b/changelog.md index 17825bb8a..3625f456f 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ TGUI 1.2 (TBD) - Added ignoreMouseEvents function to canvas widgets - Replaced getWidgetAtPosition with getWidgetAtPos - getWidgetBelowMouseCursor was given a parameter for recursive search +- Textures with different part rects were incorrectly considered equal TGUI 1.1 (4 November 2023) diff --git a/src/Texture.cpp b/src/Texture.cpp index 77972eebd..2ca0777a8 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -403,6 +403,7 @@ TGUI_IGNORE_DEPRECATED_WARNINGS_END { return (m_id == right.m_id) && (!m_id.empty() || (m_data == right.m_data)) + && (m_partRect == right.m_partRect) && (m_middleRect == right.m_middleRect) #if TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS && (m_shader == right.m_shader)