Author: suokko
Date: Tue Sep 2 11:37:36 2008
New Revision: 29184
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29184&view=rev
Log:
Fixed linewrapping with not to wrap markups (bug #11946 and bug #11945)
Modified:
trunk/changelog
trunk/src/marked-up_text.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=29184&r1=29183&r2=29184&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Sep 2 11:37:36 2008
@@ -32,6 +32,7 @@
[secondary_unit] weapon= deprecated too; use [primary_attack] and
[secondary_attack] blocks instead.
* fix various minor bugs with attack filtering
+ * Fixed linewrapping with not to wrap markups (bug #11946 and bug #11945)
* fix bug where max_experience of stored units was not the true max when
playing with under 100% exp. settings
* prevent some negative/nonsense values in direct WML unit modifications
Modified: trunk/src/marked-up_text.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/marked-up_text.cpp?rev=29184&r1=29183&r2=29184&view=diff
==============================================================================
--- trunk/src/marked-up_text.cpp (original)
+++ trunk/src/marked-up_text.cpp Tue Sep 2 11:37:36 2008
@@ -382,7 +382,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()) {
@@ -429,7 +429,7 @@
if(current_word == "\n") {
line_break = true;
- current_word = "";
+ current_word.clear();
start_of_line = true;
} else {
@@ -461,8 +461,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