Forráskód Böngészése

set_wtext() shouldn't necessarily change the cursor position

David Rose 18 éve
szülő
commit
7ff293732a
1 módosított fájl, 1 hozzáadás és 3 törlés
  1. 1 3
      panda/src/pgui/pgEntry.I

+ 1 - 3
panda/src/pgui/pgEntry.I

@@ -508,9 +508,7 @@ set_wtext(const wstring &wtext) {
     _obscure_text.set_wtext(wstring(_text.get_num_characters(), '*'));
     _obscure_text.set_wtext(wstring(_text.get_num_characters(), '*'));
   }
   }
   _text_geom_stale = true;
   _text_geom_stale = true;
-  _cursor_stale = true;
-  _blink_start = ClockObject::get_global_clock()->get_frame_time();
-  set_cursor_position(_text.get_num_characters());
+  set_cursor_position(min(_cursor_position, _text.get_num_characters()));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////