comparison pyink/domview.py @ 1321:6a014a4ec79e

Fix missed variable name after refactory
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 23 Jan 2011 09:06:05 +0800
parents b1776f441e8a
children 7f25abbc1b61
comparison
equal deleted inserted replaced
1320:6090be010927 1321:6a014a4ec79e
217 ## \brief To initialize subtree of metadata. 217 ## \brief To initialize subtree of metadata.
218 # 218 #
219 # This method is called by domview._init_metadata(). 219 # This method is called by domview._init_metadata().
220 # 220 #
221 def _component_manager_init_metadata(self): 221 def _component_manager_init_metadata(self):
222 for n in self._metadata_node.childList(): 222 metadata_node = self._metadata_node
223
224 # Make sure ns0:components in metadata
225 for n in metadata_node.childList():
223 if n.name() == 'ns0:components': 226 if n.name() == 'ns0:components':
224 self._components_node = n 227 self._components_node = n
225 break 228 break
226 pass 229 pass
227 else: 230 else:
228 components_node = self._doc.createElement("ns0:components") 231 components_node = self._doc.createElement("ns0:components")
229 node.appendChild(components_node) 232 metadata_node.appendChild(components_node)
230 self._components_node = components_node 233 self._components_node = components_node
231 pass 234 pass
232 235
236 # Make sure the group for containing components.
233 for n in self._root.childList(): 237 for n in self._root.childList():
234 if n.name() != 'svg:g': 238 if n.name() != 'svg:g':
235 continue 239 continue
236 try: 240 try:
237 nlabel = n.getAttribute('inkscape:label') 241 nlabel = n.getAttribute('inkscape:label')