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

gEDA-cvs: gaf.git: branch: master updated (1.6.1-20100214-154-gee7e4a8)



The branch, master has been updated
       via  ee7e4a8e823dd362bc0dc998cc584ab6ea84bdcd (commit)
      from  700d8c7bb6ed397185f4aee5e857979af07d2d96 (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
=========

 gschem/src/i_callbacks.c         |    3 -
 gschem/src/o_arc.c               |    3 -
 gschem/src/o_basic.c             |   32 ++++---------
 gschem/src/o_box.c               |    3 -
 gschem/src/o_bus.c               |    3 +-
 gschem/src/o_circle.c            |    3 -
 gschem/src/o_complex.c           |   10 +---
 gschem/src/o_cue.c               |   97 +++++++++++++++----------------------
 gschem/src/o_grips.c             |   19 +++-----
 gschem/src/o_line.c              |    3 +-
 gschem/src/o_misc.c              |    8 +--
 gschem/src/o_net.c               |    3 +-
 gschem/src/o_path.c              |    3 -
 gschem/src/o_picture.c           |    3 +-
 gschem/src/o_pin.c               |   17 +++----
 gschem/src/o_text.c              |   65 ++++++++++++--------------
 gschem/src/o_undo.c              |    9 +---
 gschem/src/x_basic.c             |    2 -
 gschem/src/x_event.c             |   24 ++-------
 gschem/src/x_preview.c           |    5 --
 gschem/src/x_window.c            |    2 -
 libgeda/include/libgeda/struct.h |    2 -
 libgeda/src/s_toplevel.c         |    5 --
 23 files changed, 107 insertions(+), 217 deletions(-)


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

commit ee7e4a8e823dd362bc0dc998cc584ab6ea84bdcd
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove DONT_REDRAW flag.
    
    Because we now use the GTK/Cairo renderer for gschem, we use the GTK
    model for redrawing. In this model, objects are queued for redrawing
    by invalidating them, and at some point later all invalidated regions
    of the viewable area are drawn together.
    
    Due to this mechanism, the TOPLEVEL.DONT_REDRAW flag is redundant, as
    it as always set and then restored without visiting the GTK main loop,
    and thus no drawing would occur in that context anyway.
    
    This patch removes the now-useless TOPLEVEL.DONT_REDRAW flag entirely.

:100644 100644 fb084fe... d985e77... M	gschem/src/i_callbacks.c
:100644 100644 336a910... fae015e... M	gschem/src/o_arc.c
:100644 100644 7c54415... c822e74... M	gschem/src/o_basic.c
:100644 100644 820e615... a5340d9... M	gschem/src/o_box.c
:100644 100644 94e0201... 0490b14... M	gschem/src/o_bus.c
:100644 100644 9c36a95... 1162e63... M	gschem/src/o_circle.c
:100644 100644 10f8dbb... d24ef21... M	gschem/src/o_complex.c
:100644 100644 d1d4ea8... 12df2ef... M	gschem/src/o_cue.c
:100644 100644 66d1995... 6ab1dcd... M	gschem/src/o_grips.c
:100644 100644 80b89f4... 572cd23... M	gschem/src/o_line.c
:100644 100644 08c3fb3... 364a74e... M	gschem/src/o_misc.c
:100644 100644 0ef1166... 1235ae0... M	gschem/src/o_net.c
:100644 100644 b27b13f... 6ed086a... M	gschem/src/o_path.c
:100644 100644 47d3a83... 7bc99d6... M	gschem/src/o_picture.c
:100644 100644 14345d7... 7238c31... M	gschem/src/o_pin.c
:100644 100644 4984641... a988770... M	gschem/src/o_text.c
:100644 100644 deb3aee... 13b44b5... M	gschem/src/o_undo.c
:100644 100644 6a3a78a... 7b6d81b... M	gschem/src/x_basic.c
:100644 100644 dfb4ffa... 22ac8ac... M	gschem/src/x_event.c
:100644 100644 b584163... 9050f6e... M	gschem/src/x_preview.c
:100644 100644 07beb6e... 4a6b05d... M	gschem/src/x_window.c
:100644 100644 1ea9bca... 2a5961e... M	libgeda/include/libgeda/struct.h
:100644 100644 3633bc8... 60356f0... M	libgeda/src/s_toplevel.c

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

commit ee7e4a8e823dd362bc0dc998cc584ab6ea84bdcd
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove DONT_REDRAW flag.
    
    Because we now use the GTK/Cairo renderer for gschem, we use the GTK
    model for redrawing. In this model, objects are queued for redrawing
    by invalidating them, and at some point later all invalidated regions
    of the viewable area are drawn together.
    
    Due to this mechanism, the TOPLEVEL.DONT_REDRAW flag is redundant, as
    it as always set and then restored without visiting the GTK main loop,
    and thus no drawing would occur in that context anyway.
    
    This patch removes the now-useless TOPLEVEL.DONT_REDRAW flag entirely.

diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index fb084fe..d985e77 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -438,7 +438,6 @@ DEFINE_I_CALLBACK(edit_undo)
        w_current->event_state == ENDMOVE)) {
     i_callback_cancel (w_current, 0, NULL);
   } else {
-    w_current->toplevel->DONT_REDRAW = 0;
     o_undo_callback(w_current, UNDO_ACTION);
   }
 }
@@ -469,7 +468,6 @@ DEFINE_I_CALLBACK(edit_redo)
 {
   GSCHEM_TOPLEVEL *w_current = (GSCHEM_TOPLEVEL*) data;
 
-  w_current->toplevel->DONT_REDRAW = 0;
   o_undo_callback(w_current, REDO_ACTION);
 }
 
@@ -858,7 +856,6 @@ DEFINE_I_CALLBACK(edit_rotate_90_hotkey)
     i_update_middle_button(w_current,
                            i_callback_edit_rotate_90_hotkey, _("Rotate"));
     /* Allow o_rotate_world_update to redraw the objects */
-    w_current->toplevel->DONT_REDRAW = 0;
     o_rotate_world_update(w_current, wx, wy, 90, object_list);
   }
 
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 336a910..fae015e 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -49,9 +49,6 @@ void o_arc_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     return;
   }
 
-  if (toplevel->DONT_REDRAW == 1)
-    return;
-
   gschem_cairo_arc (w_current, o_current->line_width,
                                o_current->arc->x,
                                o_current->arc->y,
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 7c54415..c822e74 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -42,7 +42,6 @@ void o_redraw_rects (GSCHEM_TOPLEVEL *w_current,
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   gboolean draw_selected;
-  int redraw_state = toplevel->DONT_REDRAW;
   int grip_half_size;
   int cue_half_size;
   int bloat;
@@ -51,11 +50,9 @@ void o_redraw_rects (GSCHEM_TOPLEVEL *w_current,
   GList *iter;
   BOX *world_rects;
 
-  if (!toplevel->DONT_REDRAW) {
-    for (i = 0; i < n_rectangles; i++) {
-      x_repaint_background_region (w_current, rectangles[i].x, rectangles[i].y,
-                                   rectangles[i].width, rectangles[i].height);
-    }
+  for (i = 0; i < n_rectangles; i++) {
+    x_repaint_background_region (w_current, rectangles[i].x, rectangles[i].y,
+                                 rectangles[i].width, rectangles[i].height);
   }
 
   g_return_if_fail (toplevel != NULL);
@@ -89,19 +86,15 @@ void o_redraw_rects (GSCHEM_TOPLEVEL *w_current,
                     ((w_current->event_state == MOVE) ||
                      (w_current->event_state == ENDMOVE)));
 
-  w_current->inside_redraw = 1;
   for (iter = obj_list; iter != NULL; iter = g_list_next (iter)) {
     OBJECT *o_current = iter->data;
 
-    if (o_current->draw_func != NULL) {
-      toplevel->DONT_REDRAW = redraw_state ||
-                              o_current->dont_redraw ||
-                              (!draw_selected && o_current->selected);
+    if ((o_current->draw_func != NULL)
+        && !(o_current->dont_redraw
+             || (!draw_selected && o_current->selected))) {
       (*o_current->draw_func)(w_current, o_current);
     }
   }
-  w_current->inside_redraw = 0;
-  toplevel->DONT_REDRAW = redraw_state;
 
   o_cue_redraw_all (w_current, obj_list, draw_selected);
 
@@ -199,21 +192,19 @@ void o_redraw (GSCHEM_TOPLEVEL *w_current, GList *object_list, gboolean draw_sel
   TOPLEVEL *toplevel = w_current->toplevel;
   OBJECT *o_current;
   GList *iter;
-  int redraw_state = toplevel->DONT_REDRAW;
 
   iter = object_list;
   while (iter != NULL) {
     o_current = (OBJECT *)iter->data;
-    if (o_current->draw_func != NULL) {
-      toplevel->DONT_REDRAW = redraw_state ||
-                              o_current->dont_redraw ||
-                              (!draw_selected && o_current->selected);
+
+    if ((o_current->draw_func != NULL)
+        && !(o_current->dont_redraw
+             || (!draw_selected && o_current->selected))) {
       (*o_current->draw_func)(w_current, o_current);
     }
 
     iter = g_list_next (iter);
   }
-  toplevel->DONT_REDRAW = redraw_state;
 }
 
 /*! \brief Redraw an object on the screen.
@@ -231,9 +222,6 @@ void o_redraw_single(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   if (o_current == NULL)
   return;
 
-  if (toplevel->DONT_REDRAW) /* highly experimental */
-  return;
-
   if (o_current->draw_func != NULL) {
     (*o_current->draw_func)(w_current, o_current);
   }
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index 820e615..a5340d9 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -64,9 +64,6 @@ void o_box_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     return;
   }
 
-  if (toplevel->DONT_REDRAW == 1)
-    return;
-
   /*
    * The drawing of the box is divided in two steps : first step is to
    * draw the outline, the second is to draw the filling pattern inside
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 94e0201..0490b14 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -47,8 +47,7 @@ void o_bus_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   }
 
   /* reuse line's routine */
-  if ( (toplevel->DONT_REDRAW == 1) ||
-       (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
+  if (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) {
     return;
   }
 
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 9c36a95..1162e63 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -57,9 +57,6 @@ void o_circle_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     return;
   }
 
-  if (toplevel->DONT_REDRAW == 1)
-    return;
-	
 #if DEBUG
   printf("drawing circle\n\n");
 #endif
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 10f8dbb..d24ef21 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -41,9 +41,7 @@ void o_complex_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   g_return_if_fail (o_current != NULL); 
   g_return_if_fail (o_current->complex != NULL);
 
-  if (!w_current->toplevel->DONT_REDRAW) {
-    o_redraw(w_current, o_current->complex->prim_objs, TRUE);
-  }
+  o_redraw(w_current, o_current->complex->prim_objs, TRUE);
 }
 
 
@@ -73,7 +71,6 @@ void o_complex_prepare_place(GSCHEM_TOPLEVEL *w_current, const CLibSymbol *sym)
   OBJECT *o_current;
   char *buffer;
   const gchar *sym_name = s_clib_symbol_get_name (sym);
-  int redraw_state;
 
   /* remove the old place list if it exists */
   s_delete_object_glist(toplevel, toplevel->page_current->place_list);
@@ -121,11 +118,8 @@ void o_complex_prepare_place(GSCHEM_TOPLEVEL *w_current, const CLibSymbol *sym)
 
   /* Run the complex place list changed hook without redrawing */
   /* since the place list is going to be redrawn afterwards */
-  redraw_state = toplevel->DONT_REDRAW;
-  toplevel->DONT_REDRAW = 1;
   o_complex_place_changed_run_hook (w_current);
-  toplevel->DONT_REDRAW = redraw_state;
-
+ 
   w_current->inside_action = 1;
   i_set_state (w_current, ENDCOMP);
 }
diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index d1d4ea8..12df2ef 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -39,7 +39,6 @@ void o_cue_redraw_all (GSCHEM_TOPLEVEL *w_current, GList *list, gboolean draw_se
   TOPLEVEL *toplevel = w_current->toplevel;
   OBJECT *o_current;
   GList *iter;
-  int redraw_state = w_current->toplevel->DONT_REDRAW;
 
   iter = list;
   while (iter != NULL) {
@@ -48,38 +47,27 @@ void o_cue_redraw_all (GSCHEM_TOPLEVEL *w_current, GList *list, gboolean draw_se
       case(OBJ_NET):
       case(OBJ_BUS):
       case(OBJ_PIN):
-	if (o_current->dont_redraw ||
-            (o_current->selected && !draw_selected)) {
-	  w_current->toplevel->DONT_REDRAW = 1 || redraw_state;
-	}
-	else {
-	  w_current->toplevel->DONT_REDRAW = 0 || redraw_state;
-	}
-        o_cue_draw_single(w_current, o_current);
-
-	if (o_current->selected && w_current->draw_grips) {
-	  o_line_draw_grips (w_current, o_current);
-	}
+	if (!(o_current->dont_redraw ||
+              (o_current->selected && !draw_selected))) {
+          o_cue_draw_single(w_current, o_current);
+          if (o_current->selected && w_current->draw_grips) {
+            o_line_draw_grips (w_current, o_current);
+          }
+        }
         break;
 
       case(OBJ_COMPLEX):
       case(OBJ_PLACEHOLDER):
-	if (o_current->dont_redraw ||
-            (o_current->selected && !draw_selected)) {
-	  toplevel->DONT_REDRAW = 1 || redraw_state;
-	}
-	else {
-	  toplevel->DONT_REDRAW = 0 || redraw_state;
-	}
-        o_cue_redraw_all(w_current, o_current->complex->prim_objs, 
-			 draw_selected);
-	break;
-
+	if (!(o_current->dont_redraw ||
+              (o_current->selected && !draw_selected))) {
+          o_cue_redraw_all(w_current, o_current->complex->prim_objs, 
+                           draw_selected);
+        }
+        break;
     }
     
     iter = g_list_next (iter);
   }
-  toplevel->DONT_REDRAW = redraw_state;
 }
 
 
@@ -117,9 +105,6 @@ static void draw_junction_cue (GSCHEM_TOPLEVEL *w_current,
   int size;
   int line_width;
 
-  if (w_current->toplevel->DONT_REDRAW)
-    return;
-
   if (bus_involved) {
     size = JUNCTION_CUE_SIZE_BUS / 2;
     line_width = BUS_WIDTH;
@@ -201,11 +186,9 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
       if (object->type == OBJ_NET) { /* only nets have these cues */
         if (count < 1) { /* Didn't find anything connected there */
           size = CUE_BOX_SIZE;
-          if (toplevel->DONT_REDRAW == 0) {
-            gschem_cairo_center_box (w_current, -1, -1, x, y, size, size);
-            o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
-            cairo_fill (w_current->cr);
-          }
+          gschem_cairo_center_box (w_current, -1, -1, x, y, size, size);
+          o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
+          cairo_fill (w_current->cr);
 
         } else if (count >= 2) {
           draw_junction_cue (w_current, x, y, bus_involved);
@@ -221,34 +204,32 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
           if (toplevel->pin_style == THICK )
             pinsize = object->line_width;
 
-          if (toplevel->DONT_REDRAW == 0) {
-            o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
-            if (object->line->y[whichone] == object->line->y[otherone]) {
-              /* horizontal line */
-              if (object->line->x[whichone] <= object->line->x[otherone]) {
-                gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
-                                                                 x + size, y);
-              } else {
-                gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
-                                                                 x - size, y);
-              }
-              gschem_cairo_stroke (w_current, TYPE_SOLID,
-                                   END_NONE, pinsize, -1, -1);
-            } else if (object->line->x[0] == object->line->x[1]) {
-              /* vertical line */
-              if (object->line->y[whichone] <= object->line->y[otherone]) {
-                gschem_cairo_line (w_current, END_NONE, pinsize, x, y,
-                                                                 x, y + size);
-              } else {
+          o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
+          if (object->line->y[whichone] == object->line->y[otherone]) {
+            /* horizontal line */
+            if (object->line->x[whichone] <= object->line->x[otherone]) {
+              gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
+                                 x + size, y);
+            } else {
+              gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
+                                 x - size, y);
+            }
+            gschem_cairo_stroke (w_current, TYPE_SOLID,
+                                 END_NONE, pinsize, -1, -1);
+          } else if (object->line->x[0] == object->line->x[1]) {
+            /* vertical line */
+            if (object->line->y[whichone] <= object->line->y[otherone]) {
                 gschem_cairo_line (w_current, END_NONE, pinsize, x, y,
-                                                                 x, y - size);
-              }
-              gschem_cairo_stroke (w_current, TYPE_SOLID,
-                                   END_NONE, pinsize, -1, -1);
+                                   x, y + size);
             } else {
-              /* angled line */
-              /* not supporting rendering of que for angled pin for now. hack */
+              gschem_cairo_line (w_current, END_NONE, pinsize, x, y,
+                                 x, y - size);
             }
+            gschem_cairo_stroke (w_current, TYPE_SOLID,
+                                 END_NONE, pinsize, -1, -1);
+          } else {
+            /* angled line */
+            /* not supporting rendering of que for angled pin for now. hack */
           }
 
         }
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index 66d1995..6ab1dcd 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -1519,19 +1519,14 @@ void o_grips_draw(GSCHEM_TOPLEVEL *w_current, int wx, int wy)
     color = SELECT_COLOR;
   }
 
-  /* A grip is a hollow square centered at (<B>x</B>,<B>y</B>)
-   * with a  width / height of 2 * <B>size</B>.
+  /* You can only tell an offset of the grip when it is very small,
+   * at which point, the object it's on is probably drawn 1px wide.
+   * Pass 0 as a hint that we're centering on a "hardware" line.
    */
-  if (toplevel->DONT_REDRAW == 0) {
-    /* You can only tell an offset of the grip when it is very small,
-     * at which point, the object it's on is probably drawn 1px wide.
-     * Pass 0 as a hint that we're centering on a "hardware" line.
-     */
-    gschem_cairo_center_box (w_current, 0, 0, wx, wy, w_size, w_size);
-
-    gschem_cairo_set_source_color (w_current, x_color_lookup (color));
-    gschem_cairo_stroke (w_current, TYPE_SOLID, END_NONE, 0, -1, -1);
-  }
+  gschem_cairo_center_box (w_current, 0, 0, wx, wy, w_size, w_size);
+
+  gschem_cairo_set_source_color (w_current, x_color_lookup (color));
+  gschem_cairo_stroke (w_current, TYPE_SOLID, END_NONE, 0, -1, -1);
 }
 
 
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index 80b89f4..572cd23 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -50,8 +50,7 @@ void o_line_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     return;
   }
 
-  if ( (toplevel->DONT_REDRAW == 1) ||
-       (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
+  if (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) {
     return;
   }
 
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index 08c3fb3..364a74e 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -199,9 +199,7 @@ void o_rotate_world_update(GSCHEM_TOPLEVEL *w_current,
     return;
   }
 
-  if (!toplevel->DONT_REDRAW) {
-    o_invalidate_glist (w_current, list);
-  }
+  o_invalidate_glist (w_current, list);
 
   /* Find connected objects, removing each object in turn from the
    * connection list. We only _really_ want those objects connected
@@ -225,9 +223,7 @@ void o_rotate_world_update(GSCHEM_TOPLEVEL *w_current,
     s_conn_update_object (toplevel, o_current);
   }
 
-  if (!toplevel->DONT_REDRAW) {
-    o_invalidate_glist (w_current, list);
-  }
+  o_invalidate_glist (w_current, list);
 
   /* All objects were rotated. Run the rotate hooks */
   o_rotate_call_hooks (w_current, list);
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 0ef1166..1235ae0 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -90,8 +90,7 @@ void o_net_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   }
 
   /* reuse line's routine */
-  if ( (toplevel->DONT_REDRAW == 1) ||
-       (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
+  if (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) {
     return;
   }
 
diff --git a/gschem/src/o_path.c b/gschem/src/o_path.c
index b27b13f..6ed086a 100644
--- a/gschem/src/o_path.c
+++ b/gschem/src/o_path.c
@@ -308,9 +308,6 @@ void o_path_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     return;
   }
 
-  if (toplevel->DONT_REDRAW == 1)
-    return;
-
   angle1 = o_current->fill_angle1;
   pitch1 = o_current->fill_pitch1;
   angle2 = o_current->fill_angle2;
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index 47d3a83..7bc99d6 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -301,8 +301,7 @@ void o_picture_draw (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   TOPLEVEL *toplevel = w_current->toplevel;
   int s_upper_x, s_upper_y, s_lower_x, s_lower_y;
 
-  if (o_current->picture == NULL ||
-      toplevel->DONT_REDRAW) {
+  if (o_current->picture == NULL) {
     return;
   }
 
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index 14345d7..7238c31 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -44,21 +44,18 @@ void o_pin_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   }
 
   /* reuse line's routine */
-  if ( (toplevel->DONT_REDRAW == 1) ||
-       (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) ) {
+  if (!o_line_visible (w_current, o_current->line, &x1, &y1, &x2, &y2)) {
     return;
   }
 
-  if (toplevel->DONT_REDRAW == 0) {
-    if (toplevel->pin_style == THICK)
-      size = o_current->line_width;
+  if (toplevel->pin_style == THICK)
+    size = o_current->line_width;
 
-    gschem_cairo_line (w_current, END_NONE, size, x1, y1, x2, y2);
+  gschem_cairo_line (w_current, END_NONE, size, x1, y1, x2, y2);
 
-    gschem_cairo_set_source_color (w_current,
-                                   o_drawing_color (w_current, o_current));
-    gschem_cairo_stroke (w_current, TYPE_SOLID, END_NONE, size, -1, -1);
-  }
+  gschem_cairo_set_source_color (w_current,
+                                 o_drawing_color (w_current, o_current));
+  gschem_cairo_stroke (w_current, TYPE_SOLID, END_NONE, size, -1, -1);
 
   /* draw the cue directly */
   o_cue_draw_lowlevel(w_current, o_current, o_current->whichend);
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 4984641..a988770 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -442,8 +442,7 @@ void o_text_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   g_return_if_fail (o_current->type == OBJ_TEXT);
   g_return_if_fail (o_current->text != NULL);
 
-  if (toplevel->DONT_REDRAW == 1 ||
-      (o_current->visibility == INVISIBLE && !toplevel->show_hidden_text)) {
+  if (o_current->visibility == INVISIBLE && !toplevel->show_hidden_text) {
     return;
   }
 
@@ -468,26 +467,24 @@ void o_text_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
       WORLDtoSCREEN (w_current, o_current->text->x, o_current->text->y, &screen_x1, &screen_y1);
       screen_x1 += offset;
       screen_y1 += offset;
-      if (toplevel->DONT_REDRAW == 0) {
-        /* Top part of the I */
-        gdk_draw_line (w_current->drawable, w_current->gc,
-                       screen_x1,
-                       screen_y1,
-                       screen_x1+small_dist,
-                       screen_y1);
-        /* Middle part of the I */
-        gdk_draw_line (w_current->drawable, w_current->gc,
-                       screen_x1+small_dist/2,
-                       screen_y1,
-                       screen_x1+small_dist/2,
-                       screen_y1+small_dist);
-        /* Bottom part of the I */
-        gdk_draw_line (w_current->drawable, w_current->gc,
-                       screen_x1,
-                       screen_y1+small_dist,
-                       screen_x1+small_dist,
-                       screen_y1+small_dist);
-      }
+      /* Top part of the I */
+      gdk_draw_line (w_current->drawable, w_current->gc,
+                     screen_x1,
+                     screen_y1,
+                     screen_x1+small_dist,
+                     screen_y1);
+      /* Middle part of the I */
+      gdk_draw_line (w_current->drawable, w_current->gc,
+                     screen_x1+small_dist/2,
+                     screen_y1,
+                     screen_x1+small_dist/2,
+                     screen_y1+small_dist);
+      /* Bottom part of the I */
+      gdk_draw_line (w_current->drawable, w_current->gc,
+                     screen_x1,
+                     screen_y1+small_dist,
+                     screen_x1+small_dist,
+                     screen_y1+small_dist);
     }
   } else {
     /* draw a box in it's place */
@@ -530,19 +527,17 @@ void o_text_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     gdk_gc_set_foreground (w_current->gc, x_get_color (LOCK_COLOR));
   }
 
-  if (toplevel->DONT_REDRAW == 0) {
-    gdk_draw_line (w_current->drawable, w_current->gc,
-                   screen_x1-small_dist,
-                   screen_y1+small_dist,
-                   screen_x1+small_dist,
-                   screen_y1-small_dist);
-
-    gdk_draw_line (w_current->drawable, w_current->gc,
-                   screen_x1+small_dist,
-                   screen_y1+small_dist,
-                   screen_x1-small_dist,
-                   screen_y1-small_dist);
-  }
+  gdk_draw_line (w_current->drawable, w_current->gc,
+                 screen_x1-small_dist,
+                 screen_y1+small_dist,
+                 screen_x1+small_dist,
+                 screen_y1-small_dist);
+
+  gdk_draw_line (w_current->drawable, w_current->gc,
+                 screen_x1+small_dist,
+                 screen_y1+small_dist,
+                 screen_x1-small_dist,
+                 screen_y1-small_dist);
 }
 
 
diff --git a/gschem/src/o_undo.c b/gschem/src/o_undo.c
index deb3aee..13b44b5 100644
--- a/gschem/src/o_undo.c
+++ b/gschem/src/o_undo.c
@@ -360,8 +360,6 @@ void o_undo_callback(GSCHEM_TOPLEVEL *w_current, int type)
 
   /* temporarily disable logging */
   save_logging = do_logging;
-  prev_status = toplevel->DONT_REDRAW;
-  toplevel->DONT_REDRAW = 1;
   do_logging = FALSE;
 
   if (w_current->undo_type == UNDO_DISK && u_current->filename) {
@@ -406,12 +404,7 @@ void o_undo_callback(GSCHEM_TOPLEVEL *w_current, int type)
   x_multiattrib_update (w_current);
 
   /* Let the caller to decide if redraw or not */
-  /* toplevel->DONT_REDRAW = 0; */
-  toplevel->DONT_REDRAW = prev_status;
-
-  if (!toplevel->DONT_REDRAW) {
-    o_invalidate_all (w_current);
-  }
+  o_invalidate_all (w_current);
   i_update_menus(w_current);
 
   /* restore saved undo structures */
diff --git a/gschem/src/x_basic.c b/gschem/src/x_basic.c
index 6a3a78a..7b6d81b 100644
--- a/gschem/src/x_basic.c
+++ b/gschem/src/x_basic.c
@@ -177,10 +177,8 @@ void x_scrollbars_update(GSCHEM_TOPLEVEL *w_current)
     return;
   }
 
-  toplevel->DONT_REDRAW = 1;
   x_hscrollbar_update(w_current);
   x_vscrollbar_update(w_current);
-  toplevel->DONT_REDRAW = 0;
 }
 
 
diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c
index dfb4ffa..22ac8ac 100644
--- a/gschem/src/x_event.c
+++ b/gschem/src/x_event.c
@@ -307,11 +307,8 @@ gint x_event_button_pressed(GtkWidget *widget, GdkEventButton *event,
         break;
 
       case(ENDROTATEP):
-        prev_state = toplevel->DONT_REDRAW;
-        toplevel->DONT_REDRAW = 0;
         o_rotate_world_update(w_current, w_x, w_y, 90,
           geda_list_get_glist(toplevel->page_current->selection_list ));
-        toplevel->DONT_REDRAW = prev_state;
 
         w_current->inside_action = 0;
         i_set_state(w_current, SELECT);
@@ -639,12 +636,7 @@ gint x_event_button_released(GtkWidget *widget, GdkEventButton *event,
         o_place_rotate(w_current);
 
         if (w_current->event_state == ENDCOMP) {
-          /* Run the complex place list changed hook without redrawing */
-          /* since all objects are being redrawn afterwards */
-          prev_state = toplevel->DONT_REDRAW;
-          toplevel->DONT_REDRAW = 1;
           o_complex_place_changed_run_hook (w_current);
-          toplevel->DONT_REDRAW = prev_state;
         }
 
         if (w_current->event_state == ENDMOVE) {
@@ -991,11 +983,9 @@ x_event_configure (GtkWidget         *widget,
   /* restore current page to saved value */
   s_page_goto (toplevel, old_page_current);
 
-  if (!toplevel->DONT_REDRAW) {
-    /* redraw the current page and update UI */
-    o_invalidate_all (w_current);
-    x_scrollbars_update (w_current);
-  }
+  /* redraw the current page and update UI */
+  o_invalidate_all (w_current);
+  x_scrollbars_update (w_current);
 
   return FALSE;
 }
@@ -1069,9 +1059,7 @@ void x_event_hschanged (GtkAdjustment *adj, GSCHEM_TOPLEVEL *w_current)
     toplevel->page_current->right -
     (current_left - new_left);
 
-  if (!toplevel->DONT_REDRAW) {
-    o_invalidate_all (w_current);
-  }
+  o_invalidate_all (w_current);
 }
 
 /*! \todo Finish function documentation!!!
@@ -1111,9 +1099,7 @@ void x_event_vschanged (GtkAdjustment *adj, GSCHEM_TOPLEVEL *w_current)
          toplevel->page_current->bottom);
 #endif
 
-  if (!toplevel->DONT_REDRAW) {
-    o_invalidate_all (w_current);
-  }
+  o_invalidate_all (w_current);
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/gschem/src/x_preview.c b/gschem/src/x_preview.c
index b584163..9050f6e 100644
--- a/gschem/src/x_preview.c
+++ b/gschem/src/x_preview.c
@@ -95,8 +95,6 @@ preview_callback_realize (GtkWidget *widget,
   preview_page = s_page_new (preview_toplevel, "unknown");
   s_page_goto (preview_toplevel, preview_page);
 
-  preview_toplevel->DONT_REDRAW = 0;
-
   a_zoom_extents(preview_w_current,
                  s_page_objects (preview_page),
                  A_PAN_DONT_REDRAW);
@@ -328,10 +326,7 @@ preview_event_configure (GtkWidget         *widget,
   GSCHEM_TOPLEVEL *preview_w_current = PREVIEW (widget)->preview_w_current;
   PAGE     *preview_page = preview_w_current->toplevel->page_current;
 
-  save_redraw = preview_w_current->toplevel->DONT_REDRAW;
-  preview_w_current->toplevel->DONT_REDRAW = 1;
   retval = x_event_configure (widget, event, preview_w_current);
-  preview_w_current->toplevel->DONT_REDRAW = save_redraw;
   if (preview_page != NULL) {
     a_zoom_extents(preview_w_current, s_page_objects (preview_page), 0);
   }
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 07beb6e..4a6b05d 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -807,11 +807,9 @@ x_window_set_current_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
   x_pagesel_update (w_current);
   x_multiattrib_update (w_current);
 
-  toplevel->DONT_REDRAW = 1;
   x_manual_resize (w_current);
   x_hscrollbar_update (w_current);
   x_vscrollbar_update (w_current);
-  toplevel->DONT_REDRAW = 0;
 
   o_invalidate_all (w_current);
 }
diff --git a/libgeda/include/libgeda/struct.h b/libgeda/include/libgeda/struct.h
index 1ea9bca..2a5961e 100644
--- a/libgeda/include/libgeda/struct.h
+++ b/libgeda/include/libgeda/struct.h
@@ -448,8 +448,6 @@ struct st_toplevel {
 
   int last_ps_color;                    /* used in print code */
 
-  int DONT_REDRAW;			/* misc flags */
-
   /* page system */
   PAGE *page_current;
   GedaPageList *pages;
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 3633bc8..60356f0 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -60,8 +60,6 @@ TOPLEVEL *s_toplevel_new (void)
 
   toplevel->override_color = -1;
 
-  toplevel->DONT_REDRAW       = 0;
-
   toplevel->pages = geda_list_new();
   toplevel->page_current = NULL;
 
@@ -143,9 +141,6 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->auto_save_interval = 0;
   toplevel->auto_save_timeout = 0;
 
-  /* disable the events */
-  toplevel->DONT_REDRAW = 1;
-
   toplevel->weak_refs = NULL;
   return toplevel;
 }




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