mail[Wesnoth-commits] r33832 - /trunk/src/help.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 18, 2009 - 16:13:
Author: soliton
Date: Wed Mar 18 16:13:50 2009
New Revision: 33832

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33832&view=rev
Log:
properly hide units with 'hide_help=true' from the advance to line

Modified:
    trunk/src/help.cpp

Modified: trunk/src/help.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=33832&r1=33831&r2=33832&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Wed Mar 18 16:13:50 2009
@@ -1289,18 +1289,17 @@
                                 advance_it != advance_end; ++advance_it) {
                                std::string unit_id = *advance_it;
                                
std::map<std::string,unit_type>::const_iterator type = 
unit_type_data::types().find_unit_type(unit_id);
-                               if(type != unit_type_data::types().end()) {
+                               if(type != unit_type_data::types().end() && 
!type->second.hide_help()) {
+                                       if (advance_it != next_units.begin()) 
ss << ", ";
                                        std::string lang_unit = 
type->second.type_name();
                                        std::string ref_id;
-                                       if (description_type(type->second) == 
FULL_DESCRIPTION && !type->second.hide_help()) {
+                                       if (description_type(type->second) == 
FULL_DESCRIPTION) {
                                                ref_id = unit_prefix + 
type->second.id();
                                        } else {
                                                ref_id = unknown_unit_topic;
                                                lang_unit += " (?)";
                                        }
                                        ss << "<ref>dst='" << escape(ref_id) 
<< "' text='" << escape(lang_unit) << "'</ref>";
-                                       if (advance_it + 1 != advance_end)
-                                               ss << ", ";
                                }
                        }
                        ss << "\n";




Related Messages


Powered by MHonArc, Updated Wed Mar 18 17:00:21 2009