Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-12-20 13:51:26 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-12-20 13:51:26 (GMT)
commitfc74c6b45c6a9af08ba3119fba6df5bf1fb8d686 (patch)
treee198265f6db02815a02034993e4929a65d9fd05e /Area.py
parenta92be290f4f912d13c4f3dbfd0d4a8ff2c16082e (diff)
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 <gonzalo@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py12
1 files changed, 8 insertions, 4 deletions
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]