Browse Source

Dirty text element geometry after clearing lines, see #810

Fixes an issue where the geometry would not be cleared when all the text contents are cleared. Previously, in some cases the old text could then be rendered. Particularly when transforms were applied as that prevents render culling from hiding the text.
Michael Ragazzon 3 months ago
parent
commit
4b1191e9b1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Source/Core/ElementText.cpp

+ 1 - 0
Source/Core/ElementText.cpp

@@ -310,6 +310,7 @@ void ElementText::ClearLines()
 	RMLUI_ZoneScoped;
 	RMLUI_ZoneScoped;
 	lines.clear();
 	lines.clear();
 	generated_decoration = Style::TextDecoration::None;
 	generated_decoration = Style::TextDecoration::None;
+	geometry_dirty = true;
 }
 }
 
 
 void ElementText::AddLine(Vector2f line_position, String line)
 void ElementText::AddLine(Vector2f line_position, String line)