changeset 1314:2aa3770f02bf

Fix issue of events for setting cursor of treeview. - comp_dock_base.refresh() would set cursor, it cause an event. But, we don't want it. - The reason of the issue is that MBScene.show() is not monitored. So, we monitor it by move its body to do_show().
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 20 Jan 2011 15:53:00 +0800
parents cc557ce8e9fa
children fcff6978f9bf
files pyink/MBScene.py pyink/comp_dock.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/MBScene.py	Thu Jan 20 15:35:56 2011 +0800
+++ b/pyink/MBScene.py	Thu Jan 20 15:53:00 2011 +0800
@@ -354,7 +354,7 @@
 	self.addTweenTypeSelector(hbox)
 	pass
 
-    def show(self):
+    def do_show(self):
 	self.OK = True
 	if not self._root:
 	    self._root = self.desktop.doc().root().repr
@@ -387,4 +387,8 @@
 	self.top.show_all()
 	self.last_update = None
 	return False
+
+    def show(self):
+	self.do_show()
+	pass
     pass
--- a/pyink/comp_dock.py	Thu Jan 20 15:35:56 2011 +0800
+++ b/pyink/comp_dock.py	Thu Jan 20 15:53:00 2011 +0800
@@ -139,6 +139,8 @@
         self._locker = domview_ui
         pass
 
+    ## \brief Start handle UI events.
+    #
     def start_handle_ui_events(self):
         self._builder.connect_signals(self)
         pass
@@ -266,7 +268,7 @@
 class comp_dock(comp_dock_base, comp_dock_ui):
     def __init__(self, domview_ui, fname=None):
         super(comp_dock, self).__init__(domview_ui, fname)
-
+        
         self.start_handle_ui_events()
         pass
     pass