[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui token.cpp,1.33,1.34

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.