CVSROOT: /cvs/gnome Module name: sketch Changes by: bherzog 05/08/13 18:34:36
Modified files: test : test_selection.py test_doceditor.py ChangeLog Sketch/Editor : selection.py doceditor.py . : ChangeLog Log message: Make the selection remember the list of last selected objects. Patch by Valentin Ungureanu (savannah patch #4283) * Sketch/Editor/selection.py (Selection): New lazy attribute "last_coord_rect" which is the coord_rect of the last selected objects. (Selection.normalize): Also normalize the list of last selected objects. (Selection.GetInfoCache): New. A version of Selection.GetInfo that also returns a cache. The purpose is to reuse this cache when normalizing the last_selected list. (Selection.SetSelection): Empty the last selected list. (Selection.Add): Set the last_selected list to the list of added objects. (Selection.Subtract): Also remove objects from the list of last selected objects. (Selection.GetLastSelected): Return the last selected objects as list. (Selection.update_last_coord_rect): Update the coord_rect of the last selected objects. * Sketch/Editor/doceditor.py (LastSelectedObjects): New. Return the last selected objects as list. * test_doceditor.py (MockGC.ParallelogramHit): New method, used by some of the selection tests. (TestSelectionMessages): New. Test selecting/deselecting with mouse clicks and test whether SELECTION messages are properly sent. (TestRemoveSimple.check_before) (TestRemoveSimple.check_after) (TestRemoveFromGroup.check_before) (TestRemoveFromGroup.check_after): Also test the list of last selected objects. * test_selection.py: Added tests for methods of Selection. (SelectionTest): New. Base class for Selection tests. (TestSelection_private): New. Some tests for the methods of Selection that are not meant to be public, with focus on Selection.normalize. (TestSelection): New. Tests for setting, adding and subtracting from selection and so on. URL : http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=sketch&who=bherzog&date=explicit&mindate=2005-08-13%2018:33&maxdate=2005-08-13%2018:35 _______________________________________________ cvs-commits-list mailing list cvs-commits-list@gnome.org http://mail.gnome.org/mailman/listinfo/cvs-commits-list