core: fixed forgotten profile in paramUpdate signal

This commit is contained in:
Goffi 2010-08-20 01:11:09 +08:00
commit 9097c58498

View file

@ -359,6 +359,10 @@ class Param():
def setParam(self, name, value, category, profile_key='@DEFAULT@'):
"""Set a parameter, return None if the parameter is not in param xml"""
profile = self.getProfileName(profile_key)
if not profile:
error(_('Trying to set parameter for an unknown profile'))
return #TODO: throw an error
node = self.__getParamNode(name, category, '@ALL@')
if not node:
@ -367,15 +371,10 @@ class Param():
if node[0] == 'general':
self.params_gen[(category, name)] = value
self.host.bridge.paramUpdate(name, value, category) #TODO: add profile in signal
self.host.bridge.paramUpdate(name, value, category, profile) #TODO: add profile in signal
return
assert (node[0] == 'individual')
profile = self.getProfileName(profile_key)
if not profile:
error(_('Trying to set parameter for an unknown profile'))
return #TODO: throw an error
type = node[1].getAttribute("type")
if type=="button":