bugfix
This commit is contained in:
parent
a819ebcff8
commit
0e84605796
@ -477,13 +477,17 @@ class Blocks(EventDispatcher):
|
|||||||
if dwidget is None:
|
if dwidget is None:
|
||||||
Logger.info('Block: desc(%s) datawidget not defined',
|
Logger.info('Block: desc(%s) datawidget not defined',
|
||||||
str(desc))
|
str(desc))
|
||||||
if hasattr(dwidget,'getValue'):
|
method = desc.get('datamethod','getValue')
|
||||||
data = dwidget.getValue()
|
largs = desc.get('dataargs',[]),
|
||||||
|
kwargs = desc.get('datakwargs',{})
|
||||||
|
if hasattr(dwidget, method):
|
||||||
|
f = getattr(dwidget, method)
|
||||||
|
data = f(**kwargs)
|
||||||
if desc.get('keymapping'):
|
if desc.get('keymapping'):
|
||||||
data = keyMapping(data, desc.get('keymapping'))
|
data = keyMapping(data, desc.get('keymapping'))
|
||||||
else:
|
else:
|
||||||
Logger.info('Block: desc(%s) datawidget has not getValue',
|
Logger.info('Block: desc(%s) datawidget has not %s',
|
||||||
str(desc))
|
str(desc), method)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def registedfunctionAction(self, widget, desc, *args):
|
def registedfunctionAction(self, widget, desc, *args):
|
||||||
|
Loading…
Reference in New Issue
Block a user