Mercurial > nagslang
changeset 481:edee5e51896f
Visual hint for move object
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 07 Sep 2013 16:54:02 +0200 |
parents | c302e304b0ce |
children | 1b7accf22999 |
files | tools/area_editor.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/area_editor.py Sat Sep 07 16:53:09 2013 +0200 +++ b/tools/area_editor.py Sat Sep 07 16:54:02 2013 +0200 @@ -610,6 +610,10 @@ def mouse_move(self, ev): old_pos = self.mouse_pos self.mouse_pos = ev.pos + if self.move_obj: + corrected_pos = self._level_coordinates(ev.pos) + snapped_pos = self.snap_to_grid(corrected_pos) + self._update_pos(self.move_obj, snapped_pos) if old_pos != self.mouse_pos and (self.cur_poly or self._draw_lines or self._move_point_mode or self._move_poly_mode):