From fd461a860aed424d6fcac523f5595579a3e46029 Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Wed, 23 Feb 2011 10:25:39 -0500
Subject: [PATCH] fixed bug introduced in b9fd3da98d (fixed superfluous rebuild
 of hidden objects)

---
 modules/gfx/src/entity.cc | 3 +++
 modules/gfx/src/entity.hh | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gfx/src/entity.cc b/modules/gfx/src/entity.cc
index fef28debb..90d16501b 100644
--- a/modules/gfx/src/entity.cc
+++ b/modules/gfx/src/entity.cc
@@ -341,6 +341,9 @@ bool Entity::UpdateIfNeeded() const
     if (updated) {
       this->CacheBoundingBox();
     }
+    needs_update_=false;
+  } else {
+    needs_update_=true;
   }
   return updated;
 }
diff --git a/modules/gfx/src/entity.hh b/modules/gfx/src/entity.hh
index a97192d39..d8571fcfc 100644
--- a/modules/gfx/src/entity.hh
+++ b/modules/gfx/src/entity.hh
@@ -311,7 +311,7 @@ private:
   bool blur_;
   float blurf1_;
   float blurf2_;
-  bool needs_update_;
+  mutable bool needs_update_;
 };
 
 
-- 
GitLab