r7475 - mugshot-client/trunk/windows/HippoUI



Author: otaylor
Date: 2008-05-09 13:29:30 -0500 (Fri, 09 May 2008)
New Revision: 7475

Modified:
   mugshot-client/trunk/windows/HippoUI/HippoAbstractControl.cpp
Log:
HippoAbstractControl: Only invalidate on allocate if the size has changed; the 
  canvas is now responsible for tracking when it needs to queue a repaint explicitly
  as well as queuing a resize. The native controls don't need us to invalidate them
  at all.


Modified: mugshot-client/trunk/windows/HippoUI/HippoAbstractControl.cpp
===================================================================
--- mugshot-client/trunk/windows/HippoUI/HippoAbstractControl.cpp	2008-05-09 18:24:23 UTC (rev 7474)
+++ mugshot-client/trunk/windows/HippoUI/HippoAbstractControl.cpp	2008-05-09 18:29:30 UTC (rev 7475)
@@ -152,8 +152,6 @@
         return;
     }
 
-    bool hadRequestChangedSinceAllocate = requestChangedSinceAllocate_;
-
     requestChangedSinceAllocate_ = false;
     insideAllocation_ = true;
 
@@ -178,12 +176,7 @@
         requestChangedSinceAllocate_ = false;
     }
 
-    // we don't want to repaint if we're just moving.
-    // However, if we queued a size request then an invalidate
-    // is required, otherwise we can short circuit the invalidate
-    // (just as we would have skipped this whole function if 
-    // position had not changed either)
-    if (sizeChanged || hadRequestChangedSinceAllocate)
+    if (sizeChanged)
         invalidate(0, 0, getWidth(), getHeight());
 
     insideAllocation_ = false;



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