bugfix
This commit is contained in:
parent
703845b20d
commit
2dc50fc08c
@ -408,10 +408,6 @@ class Blocks(EventDispatcher):
|
|||||||
|
|
||||||
def blocksAction(self,widget,desc, *args):
|
def blocksAction(self,widget,desc, *args):
|
||||||
target = Blocks.getWidgetById(desc.get('target','self'),widget)
|
target = Blocks.getWidgetById(desc.get('target','self'),widget)
|
||||||
if target is None:
|
|
||||||
Logger.info('Block: blocksAction():desc(%s) target not found',
|
|
||||||
str(desc))
|
|
||||||
return
|
|
||||||
add_mode = desc.get('mode','replace')
|
add_mode = desc.get('mode','replace')
|
||||||
opts = desc.get('options').copy()
|
opts = desc.get('options').copy()
|
||||||
d = self.getActionData(widget,desc)
|
d = self.getActionData(widget,desc)
|
||||||
@ -420,6 +416,7 @@ class Blocks(EventDispatcher):
|
|||||||
p.update(d)
|
p.update(d)
|
||||||
opts['options'] = p
|
opts['options'] = p
|
||||||
def doit(target,add_mode,o,w):
|
def doit(target,add_mode,o,w):
|
||||||
|
if target:
|
||||||
if add_mode == 'replace':
|
if add_mode == 'replace':
|
||||||
target.clear_widgets()
|
target.clear_widgets()
|
||||||
target.add_widget(w)
|
target.add_widget(w)
|
||||||
@ -436,10 +433,6 @@ class Blocks(EventDispatcher):
|
|||||||
|
|
||||||
def urlwidgetAction(self,widget,desc, *args):
|
def urlwidgetAction(self,widget,desc, *args):
|
||||||
target = Blocks.getWidgetById(desc.get('target','self'),widget)
|
target = Blocks.getWidgetById(desc.get('target','self'),widget)
|
||||||
if target is None:
|
|
||||||
Logger.info('Block: urlwidgetAction():desc(%s) target not found',
|
|
||||||
str(desc))
|
|
||||||
return
|
|
||||||
add_mode = desc.get('mode','replace')
|
add_mode = desc.get('mode','replace')
|
||||||
opts = desc.get('options').copy()
|
opts = desc.get('options').copy()
|
||||||
p = opts.get('params',{}).copy()
|
p = opts.get('params',{}).copy()
|
||||||
@ -455,6 +448,7 @@ class Blocks(EventDispatcher):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def doit(target,add_mode,o,w):
|
def doit(target,add_mode,o,w):
|
||||||
|
if target:
|
||||||
if add_mode == 'replace':
|
if add_mode == 'replace':
|
||||||
target.clear_widgets()
|
target.clear_widgets()
|
||||||
target.add_widget(w)
|
target.add_widget(w)
|
||||||
|
Loading…
Reference in New Issue
Block a user