+ self.draw.queue_draw()
+
+ def select_fp(self, treeview, event):
+ path, column, x, y = \
+ self.treeview.get_path_at_pos(int(event.x), int(event.y))
+ if path:
+ model = self.treeview.get_model()
+ ball = self.balls[model[path][0]]
+
+ # making sure that only one ball is selected
+ for i in self.balls:
+ i.selected = False
+ ball.selected = True
+
+ # available space to the image
+ w = self.evtbox.get_allocation().width
+ h = self.evtbox.get_allocation().height
+
+ # point begining from the left image border
+ wib = self.point_with_border(ball)
+
+ print wib.x, w
+
+ self.wid('viewport').get_vadjustment().value = wib.x # + (w / 2)
+ self.wid('viewport').get_hadjustment().value = wib.y # + (h / 2)
+
+ self.draw.queue_draw()
+
+ def select_fp_from_image(self, ball):
+ selection = self.treeview.get_selection()
+ selection.select_path(str(ball.position))
+
+ # making sure that only one ball is selected
+ for i in self.balls:
+ i.selected = False
+ ball.selected = True
+
+ self.draw.queue_draw()