diff pyink/frameline.py @ 1224:5d731460b32c

Remove search_by_id() from frameline. - frameline is only responsible for drawing a row of frames. - layers and scenes are managed by MBScene_dom. So, function of search_by_id() must move to MBScene_dom class. - onCellClick() and _change_active_frame() are responsible for handling GUI event. - It should not be used with workaround to implement some function. - Solutions - MBScene_dom.find_layer_n_scene_of_nod() is used to replace search_by_id(). - MBScene_framelines.active_frame() is used to replace the workaround.
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 06 Jan 2011 11:11:27 +0800
parents 33aa2d63e240
children f0864d7177e3
line wrap: on
line diff
--- a/pyink/frameline.py	Thu Jan 06 09:39:47 2011 +0800
+++ b/pyink/frameline.py	Thu Jan 06 11:11:27 2011 +0800
@@ -866,18 +866,6 @@
 	key = self._keys[pos]
 	return key.ref
 
-    def search_by_id(self,ID):
-	for k in self._keys:
-	    try:
-		if k.ref == None: continue
-	        if k.ref.getAttribute("ref") == ID:
-		    return k.idx
-	    except:
-		traceback.print_exc()
-		pass
-	    pass
-	return -1
-    
     def set_frame_data(self, idx, value):
 	pos = self._find_keyframe(idx)
 	key = self._keys[pos]