parent
6ba958cc41
commit
14acaca0b5
@ -1193,11 +1193,15 @@ class ValidatableMaskedEntry(MaskedEntry):
|
|||||||
# If content isn't empty set_text emitts changed twice.
|
# If content isn't empty set_text emitts changed twice.
|
||||||
# Protect content-changed from being updated and issue
|
# Protect content-changed from being updated and issue
|
||||||
# a manual emission afterwards
|
# a manual emission afterwards
|
||||||
|
pos = self.get_position()
|
||||||
self._block_changed = True
|
self._block_changed = True
|
||||||
MaskedEntry.set_text(self, text)
|
MaskedEntry.set_text(self, text)
|
||||||
self._block_changed = False
|
self._block_changed = False
|
||||||
self.emit('content-changed')
|
self.emit('content-changed')
|
||||||
|
|
||||||
|
if pos < len(text):
|
||||||
|
self.set_position(pos)
|
||||||
|
else:
|
||||||
self.set_position(-1)
|
self.set_position(-1)
|
||||||
|
|
||||||
# Private
|
# Private
|
||||||
|
Loading…
x
Reference in New Issue
Block a user