From 2c879c794c28ace96e8e176b7a0ca592dd9d2d40 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Sun, 30 Jun 2013 15:52:04 +0000 Subject: [PATCH] 6807: validatedmaskedentry: no attribute '_block_changed' svn: r22630 --- gramps/gui/widgets/validatedmaskedentry.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index 36e1fd994..325d0d9dc 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -235,6 +235,7 @@ class MaskedEntry(UndoableEntry): __gtype_name__ = 'MaskedEntry' def __init__(self): + self._block_changed = False UndoableEntry.__init__(self) # connect in UndoableEntry: @@ -253,7 +254,6 @@ class MaskedEntry(UndoableEntry): self._completion = None self._exact_completion = False - self._block_changed = False self.hasicon = False ## self._icon = IconEntry(self) @@ -1157,10 +1157,10 @@ class ValidatableMaskedEntry(MaskedEntry): self.data_type = None self.mandatory = False self.error_icon = error_icon + self._block_changed = False MaskedEntry.__init__(self) - self._block_changed = False self._valid = True self._def_error_msg = None self._fade = FadeOut(self, err_color) @@ -1171,7 +1171,8 @@ class ValidatableMaskedEntry(MaskedEntry): # Virtual methods def do_changed(self): - if self._block_changed: + block_changed = getattr(self, '_block_changed', True) + if block_changed: self.emit_stop_by_name('changed') return self.emit('content-changed')