# HG changeset patch # User Thinker K.F. Li # Date 1294116407 -28800 # Node ID 962a6fec21984902b9d63d78c2af3e17287f9f72 # Parent 4bbad66f23b82d6def406d70ff0527f19c97e957 Set a label for every frameline diff -r 4bbad66f23b8 -r 962a6fec2198 pyink/MBScene.py --- a/pyink/MBScene.py Tue Jan 04 12:03:02 2011 +0800 +++ b/pyink/MBScene.py Tue Jan 04 12:46:47 2011 +0800 @@ -955,6 +955,16 @@ self.add_layer(layer_idx, child) self.parse_layer(layer_idx) self._add_frameline(layer_idx) + + layer = self._layers[layer_idx] + frameline = self._framelines[layer_idx] + try: + label = layer.group.getAttribute('inkscape:label') + except: + label = layer.group.getAttribute('id') + pass + frameline.label.set_text(label) + self._show_framelines() pass @@ -965,6 +975,14 @@ def _add_frameline_for_layers(self): for layer_idx in range(len(self._layers)): self._add_frameline(layer_idx) + line = self._framelines[layer_idx] + layer = self._layers[layer_idx] + try: + label = layer.group.getAttribute('inkscape:label') + except: + label = layer.group.getAttribute('id') + pass + line.label.set_text(label) pass pass