changeset 197:ca1010f47002

core: fixed forgotten profile in paramUpdate signal
author Goffi <goffi@goffi.org>
date Fri, 20 Aug 2010 01:11:09 +0800
parents fc1654cf2a23
children 3d7a06fe3997
files tools/memory.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tools/memory.py	Fri Aug 20 00:11:26 2010 +0800
+++ b/tools/memory.py	Fri Aug 20 01:11:09 2010 +0800
@@ -359,6 +359,10 @@
 
     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 @@
         
         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":