git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3f499d7
)
Small fix to make sure the cursor stays where it is using the Pro GUI
author
Maran
<maran.hidskes@gmail.com>
Tue, 4 Sep 2012 17:54:01 +0000 (19:54 +0200)
committer
Maran
<maran.hidskes@gmail.com>
Tue, 4 Sep 2012 17:54:01 +0000 (19:54 +0200)
lib/gui_qt.py
patch
|
blob
|
history
diff --git
a/lib/gui_qt.py
b/lib/gui_qt.py
index
6693073
..
c619df3
100644
(file)
--- a/
lib/gui_qt.py
+++ b/
lib/gui_qt.py
@@
-54,6
+54,7
@@
ALIAS_REGEXP = '^(|([\w\-\.]+)@)((\w[\w\-]+\.)+[\w\-]+)$'
def numbify(entry, is_int = False):
text = unicode(entry.text()).strip()
+ pos = entry.cursorPosition()
chars = '0123456789'
if not is_int: chars +='.'
s = ''.join([i for i in text if i in chars])
@@
-72,6
+73,7
@@
def numbify(entry, is_int = False):
except:
amount = None
entry.setText(s)
+ entry.setCursorPosition(pos)
return amount