diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-12-20 13:51:26 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-12-20 13:51:26 (GMT) |
commit | fc74c6b45c6a9af08ba3119fba6df5bf1fb8d686 (patch) | |
tree | e198265f6db02815a02034993e4929a65d9fd05e /Area.py | |
parent | a92be290f4f912d13c4f3dbfd0d4a8ff2c16082e (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.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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] |