From 0132b31f4e1036902f4c880d30ce573dddd3f1b9 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Fri, 2 Jan 2004 22:54:29 +0000
Subject: fixed bug in textured cache

---
 src/FbTk/ImageControl.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index 977d899..a09b32f 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -22,7 +22,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: ImageControl.cc,v 1.8 2004/01/02 22:19:39 fluxgen Exp $
+// $Id: ImageControl.cc,v 1.9 2004/01/02 22:54:29 fluxgen Exp $
 
 #include "ImageControl.hh"
 
@@ -157,9 +157,11 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height,
         CacheList::iterator it = cache.begin();
         CacheList::iterator it_end = cache.end();
         for (; it != it_end; ++it) {
-            if ((*it)->texture_pixmap = text.pixmap().drawable() &&
-                (*it)->width == width && (*it)->height == height)
+            if ((*it)->texture_pixmap == text.pixmap().drawable() &&
+                (*it)->width == width && (*it)->height == height) {
+                (*it)->count++;
                 return (*it)->pixmap;
+            }
         }
         return None;
     }
-- 
cgit v0.11.2