[atlantik-cvs] CVS: kdeaddons/atlantikdesigner/designer designer.cpp,1.47,1.47.2.1

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdeaddons/atlantikdesigner/designer
In directory office:/tmp/cvs-serv27195

Modified Files:
      Tag: KDE_3_1_BRANCH
	designer.cpp 
Log Message:
write estategroups before cards on save

Index: designer.cpp
===================================================================
RCS file: /home/kde/kdeaddons/atlantikdesigner/designer/designer.cpp,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -u -d -r1.47 -r1.47.2.1
--- designer.cpp	9 Nov 2002 19:41:37 -0000	1.47
+++ designer.cpp	9 Jan 2003 01:55:50 -0000	1.47.2.1
@@ -631,52 +631,6 @@
 	if (boardInfo.bgColor.isValid())
 		t << "bgcolor=" << boardInfo.bgColor.name() << endl;
 
-	// now do the cards
-	
-	for (QValueList<CardStack>::Iterator it = cards.begin(); it != cards.end(); ++it)
-	{
-		t << endl << endl;
-		t << "<Cards>" << endl << endl;
-		t << "groupname=" << (*it).name() << endl;
-
-		for (CardStack::Iterator cit = (*it).begin(); cit != (*it).end(); ++cit)
-		{
-			t << endl << "[" << (*cit).name << "]" << endl;
-			QValueList<int>::Iterator vit = (*cit).values.begin();
-			for (QStringList::Iterator it = (*cit).keys.begin(); it != (*cit).keys.end(); ++it, ++vit)
-			{
-				QString key = (*it);
-				int value = (*vit);
-
-				if (key == "collect")
-				{
-					value *= -1;
-					key = "pay";
-				}
-				else if (key == "collecteach")
-				{
-					value *= -1;
-					key = "payeach";
-				}
-				else if (key == "goback")
-				{
-					value *= -1;
-					key = "advance";
-				}
-
-				if (key == "outofjail" || key == "tojail" || key == "nextrr" || key == "nextutil")
-					value = 1;
-
-				if (key == "outofjail")
-				{
-					t << "canbeowned=" << 1 << endl;
-				}
-				
-				t << key << "=" << value << endl;
-			}
-		}
-	}
-
 	t << endl << endl;
 
 	t << "<EstateGroups>" << endl;
@@ -722,6 +676,52 @@
 
 		if (!(*it).rentMath().isEmpty())
 			t << "rentmath=" << (*it).rentMath() << endl;
+	}
+
+	// now do the cards
+	
+	for (QValueList<CardStack>::Iterator it = cards.begin(); it != cards.end(); ++it)
+	{
+		t << endl << endl;
+		t << "<Cards>" << endl << endl;
+		t << "groupname=" << (*it).name() << endl;
+
+		for (CardStack::Iterator cit = (*it).begin(); cit != (*it).end(); ++cit)
+		{
+			t << endl << "[" << (*cit).name << "]" << endl;
+			QValueList<int>::Iterator vit = (*cit).values.begin();
+			for (QStringList::Iterator it = (*cit).keys.begin(); it != (*cit).keys.end(); ++it, ++vit)
+			{
+				QString key = (*it);
+				int value = (*vit);
+
+				if (key == "collect")
+				{
+					value *= -1;
+					key = "pay";
+				}
+				else if (key == "collecteach")
+				{
+					value *= -1;
+					key = "payeach";
+				}
+				else if (key == "goback")
+				{
+					value *= -1;
+					key = "advance";
+				}
+
+				if (key == "outofjail" || key == "tojail" || key == "nextrr" || key == "nextutil")
+					value = 1;
+
+				if (key == "outofjail")
+				{
+					t << "canbeowned=" << 1 << endl;
+				}
+				
+				t << key << "=" << value << endl;
+			}
+		}
 	}
 
 	t << endl << endl;
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.