fixed bug in textured cache
This commit is contained in:
parent
a5be2ef67d
commit
0132b31f4e
1 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "ImageControl.hh"
|
||||||
|
|
||||||
|
@ -157,9 +157,11 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height,
|
||||||
CacheList::iterator it = cache.begin();
|
CacheList::iterator it = cache.begin();
|
||||||
CacheList::iterator it_end = cache.end();
|
CacheList::iterator it_end = cache.end();
|
||||||
for (; it != it_end; ++it) {
|
for (; it != it_end; ++it) {
|
||||||
if ((*it)->texture_pixmap = text.pixmap().drawable() &&
|
if ((*it)->texture_pixmap == text.pixmap().drawable() &&
|
||||||
(*it)->width == width && (*it)->height == height)
|
(*it)->width == width && (*it)->height == height) {
|
||||||
|
(*it)->count++;
|
||||||
return (*it)->pixmap;
|
return (*it)->pixmap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue