[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.0-20110116-19-ga04342c)



The branch, master has been updated
       via  a04342c3f3a2c95db6dc43eeff92cc7840c002c5 (commit)
       via  c6f468849ffca1b1cc907d43a3ede1efcc82001c (commit)
       via  3bc42a053d1a4e3588f6283ef611c5e5a873ea25 (commit)
      from  5c91422ba5e7eb97e97cbcf3b111f81342ef1133 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 libgeda/src/o_selection.c |    7 ++++---
 libgeda/src/s_page.c      |   26 ++++++++++++++------------
 2 files changed, 18 insertions(+), 15 deletions(-)


=================
 Commit Messages
=================

commit a04342c3f3a2c95db6dc43eeff92cc7840c002c5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Attempt to speed up s_page_objects_in_regions ()
    
    Move object bounds retrival outside of inner loop, as the bounds
    will not change whilst we iterate over the regions we are checking.

:100644 100644 3a6b6cf... a8fa900... M	libgeda/src/s_page.c

commit c6f468849ffca1b1cc907d43a3ede1efcc82001c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Don't unselect objects which are already unselected
    
    This should avoid doing work where it isn't needed.

:100644 100644 cdb4457... 8381f64... M	libgeda/src/o_selection.c

commit 3bc42a053d1a4e3588f6283ef611c5e5a873ea25
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Remove "object already selected == TRUE" printf
    
    This was presumably debug code which should not have been commited.

:100644 100644 de8af45... cdb4457... M	libgeda/src/o_selection.c

=========
 Changes
=========

commit a04342c3f3a2c95db6dc43eeff92cc7840c002c5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Attempt to speed up s_page_objects_in_regions ()
    
    Move object bounds retrival outside of inner loop, as the bounds
    will not change whilst we iterate over the regions we are checking.

diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 3a6b6cf..a8fa900 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -785,18 +785,20 @@ GList *s_page_objects_in_regions (TOPLEVEL *toplevel, PAGE *page,
 
   for (iter = page->_object_list; iter != NULL; iter = g_list_next (iter)) {
     OBJECT *object = iter->data;
-
-    for (i = 0; i < n_rects; i++) {
-      int left, top, right, bottom;
-
-      if (world_get_single_object_bounds (toplevel, object,
-                                          &left, &top, &right, &bottom) &&
-          right  >= rects[i].lower_x &&
-          left   <= rects[i].upper_x &&
-          top    <= rects[i].upper_y &&
-          bottom >= rects[i].lower_y) {
-        list = g_list_prepend (list, object);
-        break;
+    int left, top, right, bottom;
+    int visible;
+
+    visible = world_get_single_object_bounds (toplevel, object,
+                                              &left, &top, &right, &bottom);
+    if (visible) {
+      for (i = 0; i < n_rects; i++) {
+        if (right  >= rects[i].lower_x &&
+            left   <= rects[i].upper_x &&
+            top    <= rects[i].upper_y &&
+            bottom >= rects[i].lower_y) {
+          list = g_list_prepend (list, object);
+          break;
+        }
       }
     }
   }

commit c6f468849ffca1b1cc907d43a3ede1efcc82001c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Don't unselect objects which are already unselected
    
    This should avoid doing work where it isn't needed.

diff --git a/libgeda/src/o_selection.c b/libgeda/src/o_selection.c
index cdb4457..8381f64 100644
--- a/libgeda/src/o_selection.c
+++ b/libgeda/src/o_selection.c
@@ -131,6 +131,9 @@ void o_selection_select(TOPLEVEL *toplevel, OBJECT *object)
  */
 void o_selection_unselect (TOPLEVEL *toplevel, OBJECT *object)
 {
+  if (object->selected == FALSE)
+    return;
+
   o_emit_pre_change_notify (toplevel, object);
   object->selected = FALSE;
   o_emit_change_notify (toplevel, object);

commit 3bc42a053d1a4e3588f6283ef611c5e5a873ea25
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Remove "object already selected == TRUE" printf
    
    This was presumably debug code which should not have been commited.

diff --git a/libgeda/src/o_selection.c b/libgeda/src/o_selection.c
index de8af45..cdb4457 100644
--- a/libgeda/src/o_selection.c
+++ b/libgeda/src/o_selection.c
@@ -113,10 +113,8 @@ void o_selection_print_all(const SELECTION *selection)
  */
 void o_selection_select(TOPLEVEL *toplevel, OBJECT *object)
 {
-  if (object->selected == TRUE) {
-    printf("object already selected == TRUE\n");
+  if (object->selected == TRUE)
     return;
-  }
 
   o_emit_pre_change_notify (toplevel, object);
   object->selected = TRUE;




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs