paperbox r134 - in trunk: . src



Author: markoa
Date: Sat Apr 26 14:59:34 2008
New Revision: 134
URL: http://svn.gnome.org/viewvc/paperbox?rev=134&view=rev

Log:
Fixed on-selection tag erasing

Modified:
   trunk/ChangeLog
   trunk/src/category-editor.cc

Modified: trunk/src/category-editor.cc
==============================================================================
--- trunk/src/category-editor.cc	(original)
+++ trunk/src/category-editor.cc	Sat Apr 26 14:59:34 2008
@@ -330,12 +330,12 @@
         if (pos == ustring::size_type(-1))
             text.insert(text.size(), " " + tag);
         else {
-            ustring::size_type end_pos = pos + tag.size();
+            ustring::size_type len = tag.size();
             if (pos > 0) { // erase the leading whitespace as well
                 --pos;
-                ++end_pos;
+                ++len;
             }
-            text.erase(pos, end_pos);
+            text = text.erase(pos, len);
         }
 
         buf->set_text(text);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]