Skip to content

Commit

Permalink
reset current line width when calculating text width (#655) (#757)
Browse files Browse the repository at this point in the history
Co-authored-by: ipa-fez <felix.zeltner@ipa.fraunhofer.de>
  • Loading branch information
jacobperron and ipa-fez authored Sep 13, 2021
1 parent 25596f1 commit cf8e9f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rviz_rendering/src/rviz_rendering/objects/movable_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ MovableText::calculateTotalDimensionsForPositioning(float & total_height, float
if (character == '\n') {
total_height += effective_char_height + line_spacing_;
total_width = current_width > total_width ? current_width : total_width;
current_width = 0;
} else if (character == ' ') {
current_width += space_width_;
} else {
Expand Down

0 comments on commit cf8e9f8

Please sign in to comment.