def update(self, *args): timeout_add(500, self.update, self) exists, x1, y1, x2, y2 = \ pdb.gimp_selection_bounds(self.img) if not exists or not self.changed() : return # No selection: can't draw an arrow # Clear the layer, erasing the old arrow self.layer.fill(TRANSPARENT_FILL) # Draw the new arrow. self.arrow(x1, y1, x2, y2, self.direction) pdb.gimp_displays_flush()From arrowdesigner.py