diff src/redraw_man.c @ 747:d2f2ed27b84d

Separate GEF_NOT_SHOWED and GEF_HIDDEN flags. GEF_HIDDEN mark a geo (shape) can not be showed, GEF_NOT_SHOWED is implied by GEF_HIDDEN or one of ancesters that is hidden. Redraw manager use GEF_NOT_SHOWED to determine who is not showed, actually. GEF_NOT_SHOWED is flaged when clean_shape().
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 25 Aug 2010 18:22:32 +0800
parents f42419c08a65
children 7c73fbc8d700
line wrap: on
line diff
--- a/src/redraw_man.c	Wed Aug 25 14:48:39 2010 +0800
+++ b/src/redraw_man.c	Wed Aug 25 18:22:32 2010 +0800
@@ -1226,10 +1226,11 @@
     }
     shape->geo->flags &= ~GEF_DIRTY;
 
-    if(is_coord_subtree_hidden(shape->coord))
-	sh_hide(shape);
+    if(sh_get_flags(shape, GEF_HIDDEN) ||
+       is_coord_subtree_hidden(shape->coord))
+	sh_set_flags(shape, GEF_NOT_SHOWED);
     else
-	sh_show(shape);
+	sh_clear_flags(shape, GEF_NOT_SHOWED);
 }
 
 /*! \brief Setup canvas_info for the coord.
@@ -2242,7 +2243,7 @@
 	    child = NEXT_CHILD(child);
 	} else {
 	    ASSERT(member != NULL);
-	    if((!(member->flags & GEF_HIDDEN)) &&
+	    if((!(member->flags & GEF_NOT_SHOWED)) &&
 	       is_geo_in_areas(member, n_areas, areas)) {
 		draw_shape(rdman, canvas, member->shape);
 		dirty = 1;