mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 13:00:07 +01:00
Merge pull request #1522 from wxWidgets/fix-issue1508
Initialize __oldvalue
This commit is contained in:
@@ -473,6 +473,7 @@ class IntCtrl(wx.TextCtrl):
|
||||
self.__allow_long = 0
|
||||
else:
|
||||
self.__allow_long = 1
|
||||
self.__oldvalue = None
|
||||
|
||||
if validator == wx.DefaultValidator:
|
||||
validator = IntValidator()
|
||||
@@ -506,7 +507,7 @@ class IntCtrl(wx.TextCtrl):
|
||||
before passing the events on.
|
||||
"""
|
||||
value = self.GetValue()
|
||||
if value != self.__oldvalue:
|
||||
if self.__oldvalue is None or value != self.__oldvalue:
|
||||
try:
|
||||
self.GetEventHandler().ProcessEvent(
|
||||
IntUpdatedEvent( self.GetId(), self.GetValue(), self ) )
|
||||
|
||||
Reference in New Issue
Block a user