aboutsummaryrefslogtreecommitdiff
path: root/src/Text.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-21 06:39:32 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-21 06:39:32 +0200
commit9a8e2e5c383713f471d5a0f977fbef07a5fc4738 (patch)
treebe0eaad343aa0014d5e07e4dbf6fe91fd318b842 /src/Text.cpp
parentf8b54139f89ef21eb025defd17a5655e41fb9c03 (diff)
Matrix: dont count edit/redacts as new unread messages in a room, update local read marker
Diffstat (limited to 'src/Text.cpp')
-rw-r--r--src/Text.cpp6
1 files changed, 3 insertions, 3 deletions
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
}