diff options
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 693086e..0804399 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -806,7 +806,7 @@ namespace QuickMedia { } void Body::update_dirty_state(BodyItem *body_item, float width) { - if(body_item->dirty || (body_size_changed && body_item->title_text)) { + if((body_item->dirty && !body_item->get_title().empty()) || (body_size_changed && body_item->title_text)) { body_item->dirty = false; // TODO: Find a way to optimize fromUtf8 sf::String str = sf::String::fromUtf8(body_item->get_title().begin(), body_item->get_title().end()); @@ -820,7 +820,7 @@ namespace QuickMedia { body_item->title_text->updateGeometry(); } - if(body_item->dirty_description || (body_size_changed && body_item->description_text)) { + if((body_item->dirty_description && !body_item->get_description().empty()) || (body_size_changed && body_item->description_text)) { body_item->dirty_description = false; sf::String str = sf::String::fromUtf8(body_item->get_description().begin(), body_item->get_description().end()); if(body_item->description_text) { @@ -833,7 +833,7 @@ namespace QuickMedia { body_item->description_text->updateGeometry(); } - if(body_item->dirty_author || (body_size_changed && body_item->author_text)) { + if((body_item->dirty_author && !body_item->get_author().empty()) || (body_size_changed && body_item->author_text)) { body_item->dirty_author = false; sf::String str = sf::String::fromUtf8(body_item->get_author().begin(), body_item->get_author().end()); if(body_item->author_text) { @@ -846,7 +846,7 @@ namespace QuickMedia { body_item->author_text->updateGeometry(); } - if(body_item->dirty_timestamp || (body_size_changed && body_item->timestamp_text)) { + if((body_item->dirty_timestamp && body_item->get_timestamp() != 0) || (body_size_changed && body_item->timestamp_text)) { body_item->dirty_timestamp = false; if(body_item->get_timestamp() != 0) { |