[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui token.cpp,1.33,1.34
From:       kde () office ! kde ! org
Date:       2002-12-18 23:37:51
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv23841

Modified Files:
	token.cpp 
Log Message:
only call loadIcon when necessary

Index: token.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/token.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- token.cpp	29 Nov 2002 04:27:31 -0000	1.33
+++ token.cpp	18 Dec 2002 23:37:49 -0000	1.34
@@ -51,7 +51,6 @@
 
 	// Init icon
 	m_image = 0;
-	m_imageName = "hamburger";
 	loadIcon();
 
 	setFixedSize(QSize(ICONSIZE, ICONSIZE + KGlobalSettings::generalFont().pointSize()));
@@ -76,7 +75,8 @@
 
 void Token::playerChanged()
 {
-	loadIcon();
+	if (m_imageName != m_player->image())
+		loadIcon();
 
 	b_recreate = true;
 	update();
@@ -84,12 +84,7 @@
 
 void Token::loadIcon()
 {
-	kdDebug() << "loadicon [" << m_imageName << "][" << m_player->image() << "]" << endl;
-
-	if (m_imageName != m_player->image())
-		m_imageName = m_player->image();
-	else
-		return;
+	m_imageName = m_player->image();
 
 	delete m_image;
 	m_image = 0;

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@mail.kde.org
http://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic