Author: suokko
Date: Tue Sep  2 11:40:29 2008
New Revision: 29185

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29185&view=rev
Log:
backported: Fixed linewrapping with not to wrap markups (bug #11946 and bug 
#11945)


Modified:
    branches/1.4/changelog
    branches/1.4/src/marked-up_text.cpp

Modified: branches/1.4/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/changelog?rev=29185&r1=29184&r2=29185&view=diff
==============================================================================
--- branches/1.4/changelog (original)
+++ branches/1.4/changelog Tue Sep  2 11:40:29 2008
@@ -12,6 +12,7 @@
    * 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 

Modified: branches/1.4/src/marked-up_text.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/marked-up_text.cpp?rev=29185&r1=29184&r2=29185&view=diff
==============================================================================
--- branches/1.4/src/marked-up_text.cpp (original)
+++ branches/1.4/src/marked-up_text.cpp Tue Sep  2 11:40:29 2008
@@ -374,7 +374,7 @@
        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 @@
 
                if(current_word == "\n") {
                        line_break = true;
-                       current_word = "";
+                       current_word.clear();
                        start_of_line = true;
                } else {
 
@@ -453,8 +453,8 @@
                                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;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to