Mercurial > MadButterfly
changeset 1169:ac5f960ba6cf
Merge
author | wycc |
---|---|
date | Thu, 30 Dec 2010 11:12:34 +0800 |
parents | be1f15701770 (current diff) d73ef03c96de (diff) |
children | e64b02951627 |
files | |
diffstat | 2 files changed, 27 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/MBScene.py Thu Dec 30 11:12:22 2010 +0800 +++ b/pyink/MBScene.py Thu Dec 30 11:12:34 2010 +0800 @@ -714,16 +714,25 @@ pass def _create_framelines(self): - self.scrollwin = gtk.ScrolledWindow() - self.scrollwin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrollwin.set_size_request(-1,150) + if not hasattr(self, 'scrollwin'): + self.scrollwin = gtk.ScrolledWindow() + self.scrollwin.set_policy(gtk.POLICY_AUTOMATIC, + gtk.POLICY_AUTOMATIC) + self.scrollwin.set_size_request(-1,150) + vbox = gtk.VBox() + vbox.show() + self.scrollwin.add_with_viewport(vbox) + self.scrollwin_vbox = vbox + else: + self.scrollwin.remove(self.scrollwin_vbox) + vbox = gtk.VBox() + vbox.show() + self.scrollwin.add_with_viewport(vbox) + self.scrollwin_vbox = vbox + pass nframes = 100 - vbox = gtk.VBox() - vbox.show() - self.scrollwin.add_with_viewport(vbox) - ruler = frameruler(nframes) ruler.set_size_request(nframes * 10, 20) ruler.show() @@ -807,7 +816,7 @@ node = self.duplicateSceneGroup(last_key.ref.getAttribute("id")) key.ref = node self.update() - self.show() + self.updateUI() self.doEditScene(None) return last_key = key @@ -1009,15 +1018,17 @@ def updateUI(self,node=None,arg=None): if self.lockui: return - self.lockui = True - self._updateUI() - self.lockui = False + + if self.last_update!= None: + glib.source_remove(self.last_update) + self.last_update = glib.timeout_add(300,self._updateUI) + pass def _updateUI(self,node=None,arg=None): - if self.last_update!= None: - glib.source_remove(self.last_update) - self.last_update = glib.timeout_add(300,self.show) + self.parseScene() + self._create_framelines() + self._update_framelines() pass def show(self): @@ -1028,9 +1039,7 @@ self.document = self.desktop.doc().rdoc self.tween = TweenObject(self.document, self.root) - self.parseScene() - self._create_framelines() - self._update_framelines() + self._updateUI() if self.top == None: self.top = gtk.VBox(False,0) self.desktop.getToplevel().child.child.pack_end(self.top,expand=False)
--- a/src/shape_path.c Thu Dec 30 11:12:22 2010 +0800 +++ b/src/shape_path.c Thu Dec 30 11:12:34 2010 +0800 @@ -1190,7 +1190,7 @@ } path->dev_data = path->user_data + msz; - memcpy(path->user_data, commands, strlen(commands)); + memcpy(path->user_data, commands, strlen(commands) + 1); memcpy(path->user_data + cmd_cnt, pnts, sizeof(co_aix) * pnt_cnt); memcpy(path->user_data + cmd_cnt + pnt_cnt * sizeof(co_aix), float_args, sizeof(co_aix) * float_arg_cnt);