forked from bitcoinafterlife/bal-electrum-plugin
default locktime as date or as intervall depending on value.
This commit is contained in:
20
qt.py
20
qt.py
@@ -1331,6 +1331,12 @@ class HeirsLockTimeEdit(QWidget, _LockTimeEditor):
|
|||||||
self.on_current_index_changed(index)
|
self.on_current_index_changed(index)
|
||||||
|
|
||||||
def set_locktime(self, x: Any, force=True) -> None:
|
def set_locktime(self, x: Any, force=True) -> None:
|
||||||
|
try:
|
||||||
|
int(x)
|
||||||
|
self.set_index(1)
|
||||||
|
except:
|
||||||
|
if isinstance(x,str):
|
||||||
|
self.set_index(0)
|
||||||
self.editor.set_locktime(x, force)
|
self.editor.set_locktime(x, force)
|
||||||
|
|
||||||
|
|
||||||
@@ -2527,13 +2533,13 @@ class BalBuildWillDialog(BalDialog):
|
|||||||
pass
|
pass
|
||||||
self.updatemessage.emit()
|
self.updatemessage.emit()
|
||||||
|
|
||||||
def clear_layout(self,layout):
|
#def clear_layout(self,layout):
|
||||||
while layout.count():
|
# while layout.count():
|
||||||
item = layout.takeAt(0)
|
# item = layout.takeAt(0)
|
||||||
w = item.widget()
|
# w = item.widget()
|
||||||
if w:
|
# if w:
|
||||||
w.setParent(None)
|
# w.setParent(None)
|
||||||
w.deleteLater()
|
# w.deleteLater()
|
||||||
|
|
||||||
#def msg_update(self):
|
#def msg_update(self):
|
||||||
# self.clear_layout(self.labelsbox)
|
# self.clear_layout(self.labelsbox)
|
||||||
|
|||||||
Reference in New Issue
Block a user