Browse Source

Merge pull request #1076 from reven86/next-clean

Fixed permanent dirty state on containers containing hidden controls
Sean Paul Taylor 12 years ago
parent
commit
824f7031f7
3 changed files with 9 additions and 0 deletions
  1. 3 0
      gameplay/src/Container.cpp
  2. 3 0
      gameplay/src/Control.cpp
  3. 3 0
      gameplay/src/Slider.cpp

+ 3 - 0
gameplay/src/Container.cpp

@@ -502,7 +502,10 @@ void Container::draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needs
     }
 
     if (!_visible)
+    {
+        _dirty = false;
         return;
+    }
 
     spriteBatch->start();
     Control::drawBorder(spriteBatch, clip);

+ 3 - 0
gameplay/src/Control.cpp

@@ -1132,7 +1132,10 @@ void Control::draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsCl
     }
 
     if (!_visible)
+    {
+        _dirty = false;
         return;
+    }
 
     spriteBatch->start();
     drawBorder(spriteBatch, clip);

+ 3 - 0
gameplay/src/Slider.cpp

@@ -494,7 +494,10 @@ void Slider::draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsCle
     }
 
     if (!_visible)
+    {
+        _dirty = false;
         return;
+    }
 
     spriteBatch->start();
     drawBorder(spriteBatch, clip);