backported: Fixed linewrapping with not to wrap markups...

...(bug #11946 and bug #11945)
This commit is contained in:
Pauli Nieminen 2008-09-02 09:40:29 +00:00
parent c182bda3fe
commit 6365ec4411
2 changed files with 5 additions and 4 deletions

View file

@ -12,6 +12,7 @@ Version 1.4.4+svn:
* updated manual: Hungarian
* fonts: DejaVuSans 2.26
* miscellaneous and bug fixes:
* Fixed linewrapping with not to wrap markups (bug #11946 and bug #11945)
* Fixed OOS bug when giving control and having move in undo stack.
* Fixed crash when ai moves units next to level 0 hiden unit (bug #12252)
* Fixed loading ai parameters. MP side defination now overwrites

View file

@ -374,7 +374,7 @@ std::string word_wrap_text(const std::string& unwrapped_text, int font_size, int
while(1) {
if(start_of_line) {
line_width = 0;
format_string = "";
format_string.clear();
while(ch != end && *ch < static_cast<wchar_t>(0x100)
&& is_format_char(*ch) && !ch.next_is_end()) {
@ -421,7 +421,7 @@ std::string word_wrap_text(const std::string& unwrapped_text, int font_size, int
if(current_word == "\n") {
line_break = true;
current_word = "";
current_word.clear();
start_of_line = true;
} else {
@ -453,8 +453,8 @@ std::string word_wrap_text(const std::string& unwrapped_text, int font_size, int
wrapped_text += '\n';
}
wrapped_text += current_line;
current_line = format_string;
wrapped_text += format_string + current_line;
current_line.clear();
line_width = 0;
current_height += size.h;
line_break = false;