diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-05-28 01:33:38 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-05-28 01:33:38 (GMT) |
commit | 453d8f15cfae89de2a134b7ac085a5ba030068a0 (patch) | |
tree | 718f25d287ef9595807c04aa1f289dede6574cb4 | |
parent | 6a79db9e131b629e66737eb32c74db430c8e7e5b (diff) | |
parent | 097e0e25e04db0855298c0ed92ba7c9ed306c5e3 (diff) |
Merge branch 'master' of git.sugarlabs.org:animate/mainline
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | frames_list.py | 11 |
2 files changed, 10 insertions, 4 deletions
@@ -1,9 +1,8 @@ New functions: - Save data in journal - Select time between frames - - Select the frames when the activitie loads them. Fixes: - Enable drag and drop between frames. - Correct frame selection in ping pong mode Bugs: - Void. + - Doesn't scroll to the seleceted item diff --git a/frames_list.py b/frames_list.py index 3286e3d..5df5ba6 100644 --- a/frames_list.py +++ b/frames_list.py @@ -53,7 +53,13 @@ class FramesList(gtk.ScrolledWindow): model.remove(_iter) count = 1 for i in self.store: - i[0] = count + print i + selected = False + if i[0] != count: + i[0] = count + if not selected: + self.selection.select_iter(_iter) + selected = True count += 1 self.frames = count - 1 @@ -67,7 +73,8 @@ class FramesList(gtk.ScrolledWindow): preview_pixbuf = pixbuf.scale_simple(200, 200 * height / width, gtk.gdk.INTERP_TILES) - self.store.append([self.frames, preview_pixbuf]) + _iter = self.store.append([self.frames, preview_pixbuf]) + self.selection.select_iter(_iter) if self._animation and not self._animation_connected: self._animation.connect("current-frame-updated", self._select_frame) self._animation_connected = True |