From 7ff293732ae971819d94ee7fd0f2c25b9181b16f Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 13 Jul 2007 21:54:52 +0000 Subject: [PATCH] set_wtext() shouldn't necessarily change the cursor position --- panda/src/pgui/pgEntry.I | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/panda/src/pgui/pgEntry.I b/panda/src/pgui/pgEntry.I index 9e742d2123..e9a0232e77 100644 --- a/panda/src/pgui/pgEntry.I +++ b/panda/src/pgui/pgEntry.I @@ -508,9 +508,7 @@ set_wtext(const wstring &wtext) { _obscure_text.set_wtext(wstring(_text.get_num_characters(), '*')); } _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())); } ////////////////////////////////////////////////////////////////////