From fc74c6b45c6a9af08ba3119fba6df5bf1fb8d686 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Fri, 20 Dec 2013 13:51:26 +0000 Subject: Fix the operation of end a selection Now, when a tool is selected, and a selection is active, the selection finish. Also the canvas is updated properly. Signed-off-by: Gonzalo Odiard --- (limited to 'Area.py') diff --git a/Area.py b/Area.py index 52d155d..3f8b3e0 100644 --- a/Area.py +++ b/Area.py @@ -532,17 +532,21 @@ class Area(Gtk.DrawingArea): self._selmove = False self._selresize = True else: - self.getout() - self._selmove = False - self._selresize = False + self.end_selection() design_mode = False - else: self._selmove = False if design_mode: self.desenha = True + def end_selection(self): + if self.is_selected(): + self.getout() + self._selmove = False + self._selresize = False + self.queue_draw() + def calculate_damaged_area(self, points): min_x = points[0][0] min_y = points[0][1] -- cgit v0.9.1