From d054f38ee5fd70b6cc4b2bf79c81736ac0b1e101 Mon Sep 17 00:00:00 2001 From: Alexandre Antonino Gonçalves Martinazzo Date: Thu, 01 Nov 2007 17:10:18 +0000 Subject: Changes from André: Bug #3709 fixed; Right click only works with 'selection' and 'free polygon' Fixed bug with free polygon Bug #3703 fixed; 'Crtl+A' select all and 'Crtl+D' deselect, without buttons for now Bug #3702 fixed; 'Erase' delete selection, 'return' confirm the selection --- (limited to 'Desenho.py') diff --git a/Desenho.py b/Desenho.py index cbaca21..c3a5bb8 100644 --- a/Desenho.py +++ b/Desenho.py @@ -190,7 +190,7 @@ class Desenho: widget.queue_draw() - def square(self, widget, coords, temp, fill): + def square(self, widget, event, coords, temp, fill): """Draw a square. @param self -- Desenho.Desenho instance @@ -713,7 +713,7 @@ class Desenho: widget.pixmap.draw_line(widget.gc_line,widget.oldx,widget.oldy, coords[0], coords[1]) widget.enableUndo(widget) widget.last = coords - widget.polygon_start = False + widget.polygon_start = False else: if param == "motion": # print "press" @@ -740,6 +740,15 @@ class Desenho: widget.polygon_start = True widget.undo_times -= 1#destroy the undo screen of polygon start widget.enableUndo(widget) + elif param == "bug": + tp = tuple(widget.points) + if fill == True: + pixmap.draw_polygon(widget.gc, True, tp) + pixmap.draw_polygon(widget.gc_line, False, tp) + widget.last = [] + widget.polygon_start = True + widget.undo_times -= 1#destroy the undo screen of polygon start + widget.enableUndo(widget) widget.queue_draw() def adjust(self, widget, coords, locked=False): -- cgit v0.9.1