From 344cdef1ec3b1d110118f2f931f493d7741195e4 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Mon, 10 Dec 2012 18:34:57 -0300
Subject: [PATCH sugar 1/2] Avoid collisions with central buddy SL #3944
When a collision is detected:
- if one of the icons is locked, just add the other (free) one to the
collision list
- if no one of them are locked, add both to the collision list
This decrease the possibility to collide with locked icons because
they (the icons who collide) are added to the collision list and then
'__solve_collisions_cb' is called to try to re-organize them.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
---
src/jarabe/desktop/grid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/jarabe/desktop/grid.py b/src/jarabe/desktop/grid.py
index 9d6d820..83404e2 100644
a
|
b
|
class Grid(SugarExt.Grid): |
201 | 201 | intersects_, intersection = Gdk.rectangle_intersect( |
202 | 202 | child_rect, self._child_rects[c]) |
203 | 203 | if c != child and intersection.width > 0: |
| 204 | collision_found = True |
204 | 205 | if (c not in self._locked_children and |
205 | 206 | c not in self._collisions): |
206 | | collision_found = True |
207 | 207 | self._collisions.append(c) |
208 | 208 | |
209 | 209 | if collision_found: |