From 9a8e2e5c383713f471d5a0f977fbef07a5fc4738 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Oct 2020 06:39:32 +0200 Subject: Matrix: dont count edit/redacts as new unread messages in a room, update local read marker --- src/Text.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text.cpp') diff --git a/src/Text.cpp b/src/Text.cpp index a00d068..44730c3 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -282,14 +282,15 @@ namespace QuickMedia if(!update_even_if_not_dirty && !dirty) return; + dirty = false; vertices_linear.clear(); vertices[0].clear(); vertices[1].clear(); + boundingBox = sf::FloatRect(); + float hspace = font->getGlyph(' ', characterSize, false).advance + characterSpacing; float vspace = font->getLineSpacing(characterSize); // TODO: What about japanese font??? - boundingBox = sf::FloatRect(); - sf::Vector2f glyphPos; sf::Uint32 prevCodePoint = 0; for(usize textElementIndex = 0; textElementIndex < textElements.size(); ++textElementIndex) @@ -464,7 +465,6 @@ namespace QuickMedia boundingBox.width = std::max(boundingBox.width, get_text_quad_right_side(vertex_ref)); } boundingBox.height = num_lines * line_height; - dirty = false; // TODO: Clear vertices_linear when not in edit mode, but take into consideration switching between edit/not-edit mode } -- cgit v1.2.3