textinput: fix invalid selection done when releasing shift key

This commit is contained in:
Mathieu Virbel 2012-01-31 17:43:08 +01:00
parent 5f1b45bc01
commit ae531b9401
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
\definecolor{TitleColor}{rgb}{0,0,0}
% Make links the same color as links on the website
\definecolor{InnerLinkColor}{rgb}{0.875,0.392,0.133}

View File

@ -909,7 +909,8 @@ class TextInput(Widget):
def _key_up(self, key, repeat=False):
displayed_str, internal_str, internal_action, scale = key
if internal_action in ('shift', 'shift_L', 'shift_R'):
self._update_selection(True)
if self._selection:
self._update_selection(True)
def _keyboard_on_key_down(self, window, keycode, text, modifiers):
global Clipboard