X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ebc89b9f61e89f9da580f62e2d79179a3db38654..f8167d6ee27a9e99a7b1161efbc0bcdb1a220b40:/wxPython/wx/lib/masked/maskededit.py diff --git a/wxPython/wx/lib/masked/maskededit.py b/wxPython/wx/lib/masked/maskededit.py index 3bde5a3ca5..ec0d1de1fc 100644 --- a/wxPython/wx/lib/masked/maskededit.py +++ b/wxPython/wx/lib/masked/maskededit.py @@ -1915,9 +1915,8 @@ class MaskedEditMixin: if self._autofit: ## dbg('setting client size to:', self._CalcSize()) - size = self._CalcSize() - self.SetSizeHints(size) - self.SetClientSize(size) + self.SetClientSize(self._CalcSize()) + self.SetSizeHints(self.GetSize()) # Set value/type-specific formatting self._applyFormatting() @@ -1992,9 +1991,8 @@ class MaskedEditMixin: self._SetInitialValue() if self._autofit: - size = self._CalcSize() - self.SetSizeHints(size) - self.SetClientSize(size) + self.SetClientSize(self._CalcSize()) + self.SetSizeHints(self.GetSize()) # Set value/type-specific formatting self._applyFormatting() @@ -3091,7 +3089,7 @@ class MaskedEditMixin: def _OnCtrl_A(self,event=None): """ Handles ctrl-a keypress in control. Should return False to skip other processing. """ end = self._goEnd(getPosOnly=True) - if not event or event.ShiftDown(): + if not event or (isinstance(event, wx.KeyEvent) and event.ShiftDown()): wx.CallAfter(self._SetInsertionPoint, 0) wx.CallAfter(self._SetSelection, 0, self._masklength) else: