[atlantik-cvs] CVS: kdeaddons/atlantikdesigner/designer designer.cpp,1.48,1.49
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdeaddons/atlantikdesigner/designer
In directory office:/tmp/cvs-serv27166
Modified Files:
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.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- designer.cpp 23 Dec 2002 05:25:27 -0000 1.48
+++ designer.cpp 9 Jan 2003 01:55:13 -0000 1.49
@@ -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;