[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui board.cpp,1.96.6.7,1.96.6.8

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv32272/libatlantikui

Modified Files:
      Tag: KDE_3_1_BRANCH
	board.cpp 
Log Message:
backport; hide token when player goes bankrupt

Index: board.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.cpp,v
retrieving revision 1.96.6.7
retrieving revision 1.96.6.8
diff -u -d -r1.96.6.7 -r1.96.6.8
--- board.cpp	9 Jun 2003 19:12:22 -0000	1.96.6.7
+++ board.cpp	22 Jun 2003 00:08:06 -0000	1.96.6.8
@@ -206,6 +206,8 @@
 	Token *token = findToken(player);
 	if (token)
 	{
+		if (player->isBankrupt())
+			token->hide();
 		if (player->hasTurn())
 			token->raise();
 
@@ -269,14 +271,15 @@
 	QPoint tGeom = calculateTokenDestination(token);
 	token->setGeometry(tGeom.x(), tGeom.y(), token->width(), token->height());
 
-	if (Player *player = token->player())
+	Player *player = token->player();
+	if (player)
 	{
 		player->setLocation(token->location());
 		player->setDestination(0);
-	}
 
-	if (token->isHidden())
-		token->show();
+		if (token->isHidden() && !player->isBankrupt())
+			token->show();
+	}
 
 	if (token == m_movingToken)
 	{
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.