Changeset 3235

Show
Ignore:
Timestamp:
07/11/2007 01:25:58 PM (1 year ago)
Author:
paul
Message:

I finally traced down something that's been aggravating me forever: if you change
a value in a data-bound textbox, and press 'tab' to move to another textbox, the
newly-focused textbox will lose it's select-all status and the caret will be
at the beginning of the field.

Fixed in trunk and stable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/dabo/ui/uiwx/dTextBox.py

    r3054 r3235  
    477477                self._lastDataType = type(val) 
    478478 
    479             # Update the display no matter what: 
    480             self.SetValue(strVal) 
     479            # Update the display if it is different from what is already displayed 
     480            # (note that if we did it unconditionally, the user's selection could 
     481            # be reset, which isn't very nice): 
     482            if strVal != self.GetValue(): 
     483                self.SetValue(strVal) 
    481484         
    482485            if type(_oldVal) != type(val) or _oldVal != val: 
  • trunk/dabo/ui/uiwx/dTextBoxMixin.py

    r3192 r3235  
    624624                self._lastDataType = type(val) 
    625625 
    626             # Update the display no matter what: 
    627             setter(strVal) 
     626            # Update the display if it is different from what is already displayed 
     627            # (note that if we did it unconditionally, the user's selection could 
     628            # be reset, which isn't very nice): 
     629            if strVal != self.GetValue(): 
     630                setter(strVal) 
    628631         
    629632            if type(_oldVal) != type(val) or _oldVal != val: