]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/masked/maskededit.py
reSWIGged
[wxWidgets.git] / wxPython / wx / lib / masked / maskededit.py
index a38facc38f19ecef54be5cd6dd536063811d1c7e..ec0d1de1fc4f53bf394626bee5c70577bb4899f6 100644 (file)
@@ -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()