Author: toshok
Date: 2007-08-22 13:42:17 -0400 (Wed, 22 Aug 2007)
New Revision: 84649

Modified:
   branches/moon-delayed-rendering/src/ChangeLog
   branches/moon-delayed-rendering/src/uielement.cpp
Log:
2007-08-22  Chris Toshok  <[EMAIL PROTECTED]>

        * uielement.cpp (Invalidate): don't actually invalidate the
        element unless it's visible.
        (OnPropertyChanged): the above change requires us to invalidate
        the element before setting the flags (in the case where we're
        hiding an element).



Modified: branches/moon-delayed-rendering/src/ChangeLog
===================================================================
--- branches/moon-delayed-rendering/src/ChangeLog       2007-08-22 16:41:10 UTC 
(rev 84648)
+++ branches/moon-delayed-rendering/src/ChangeLog       2007-08-22 17:42:17 UTC 
(rev 84649)
@@ -1,3 +1,11 @@
+2007-08-22  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * uielement.cpp (Invalidate): don't actually invalidate the
+       element unless it's visible.
+       (OnPropertyChanged): the above change requires us to invalidate
+       the element before setting the flags (in the case where we're
+       hiding an element).
+
 2007-08-21  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * media.cpp (ComputeBounds): Use the FrameworkElement width/height

Modified: branches/moon-delayed-rendering/src/uielement.cpp
===================================================================
--- branches/moon-delayed-rendering/src/uielement.cpp   2007-08-22 16:41:10 UTC 
(rev 84648)
+++ branches/moon-delayed-rendering/src/uielement.cpp   2007-08-22 17:42:17 UTC 
(rev 84649)
@@ -91,8 +91,8 @@
                        Invalidate ();
                        break;
                case VisibilityCollapsed:
+                       FullInvalidate (true);
                        flags &= ~UIElement::RENDER_VISIBLE;
-                       FullInvalidate (true);
                        break;
                default:
                        g_assert_not_reached ();
@@ -254,6 +254,9 @@
 void
 UIElement::Invalidate (Rect r)
 {
+       if (!GetVisible())
+               return;
+
 #ifdef DEBUG_INVALIDATE
        printf ("Requesting invalidate for object %p (%s) at %d %d - %d %d\n", 
                this, Type::Find(GetObjectType())->name,

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to