dabo Commit
Revision 6694
Date: 2011-07-10 05:47:05 -0700 (Sun, 10 Jul 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6694

Changed:
U   trunk/dabo/ui/uiwx/dSpinner.py

Log:
Fix dSpinner control flush on update issue.

Diff:
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py      2011-07-10 04:53:01 UTC (rev 6693)
+++ trunk/dabo/ui/uiwx/dSpinner.py      2011-07-10 12:47:05 UTC (rev 6694)
@@ -32,7 +32,7 @@
        Control for allowing a user to increment a value by discreet steps 
across a range
        of valid values.
        """
-       def __init__(self, parent, properties=None, attProperties=None, 
TextBoxClass=None,  *args, **kwargs):
+       def __init__(self, parent, properties=None, attProperties=None, 
TextBoxClass=None, *args, **kwargs):
                self.__constructed = False
                self._spinWrap = False
                self._min = 0
@@ -66,7 +66,7 @@
                ps = self._proxy_spinner
                pt = self._proxy_textbox
                # Set an essentially infinite range. We'll handle the range 
ourselves.
-               ps.SetRange(-2**30, 2**30)
+               ps.SetRange(-2 ** 30, 2 ** 30)
                # We'll also control wrapping ourselves
                self._proxy_spinner._addWindowStyleFlag(wx.SP_WRAP)
                ps.Bind(wx.EVT_SPIN_UP, self.__onWxSpinUp)
@@ -365,6 +365,7 @@
 
        def _setValue(self, val):
                if self._constructed():
+                       self._proxy_textbox._inDataUpdate = self._inDataUpdate
                        if isinstance(val, (int, long, float, decimal)):
                                self._proxy_textbox.Value = val
                        else:
@@ -373,6 +374,7 @@
                                        dabo.log.error(_("Spinner values must 
be numeric. Invalid:'%s'") % val)
                                else:
                                        self._proxy_textbox.Value = val
+                       self._proxy_textbox._inDataUpdate = False
                else:
                        self._properties["Value"] = val
 
@@ -411,7 +413,7 @@
        # Pass-through props. These are simply ways of exposing the text 
control's props
        # through this control
        _proxyDict = {}
-       Alignment = makeProxyProperty(_proxyDict, "Alignment", 
"_proxy_textbox", )
+       Alignment = makeProxyProperty(_proxyDict, "Alignment", 
"_proxy_textbox",)
        BackColor = makeProxyProperty(_proxyDict, "BackColor", 
("_proxy_textbox", "self"))
        Enabled = makeProxyProperty(_proxyDict, "Enabled", ("self", 
"_proxy_spinner", "_proxy_textbox"))
        Font = makeProxyProperty(_proxyDict, "Font", "_proxy_textbox")



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to