summaryrefslogtreecommitdiff
path: root/src/client/Client.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-03-22 13:50:43 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-03-22 13:50:43 (GMT)
commit23873eae719a1c0a1227a4e108a158a9ec625462 (patch)
treed397224fa7a0d01de2f18d2449c3b5d4fcaa6638 /src/client/Client.cpp
parent7e3d45bbfb701a5eca3e93b589680d8651ada016 (diff)
downloadpowder-23873eae719a1c0a1227a4e108a158a9ec625462.zip
powder-23873eae719a1c0a1227a4e108a158a9ec625462.tar.gz
More work on Tags - display tags in Tag window and Tag button
Diffstat (limited to 'src/client/Client.cpp')
-rw-r--r--src/client/Client.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp
index 1fbff93..f6c2ecb 100644
--- a/src/client/Client.cpp
+++ b/src/client/Client.cpp
@@ -359,6 +359,16 @@ Save * Client::GetSave(int saveID, int saveDate)
json::String tempDescription = objDocument["Description"];
json::Number tempDate = objDocument["Date"];
json::Boolean tempPublished = objDocument["Published"];
+
+ json::Array tagsArray = objDocument["Tags"];
+ vector<string> tempTags;
+
+ for(int j = 0; j < tagsArray.Size(); j++)
+ {
+ json::String tempTag = tagsArray[j];
+ tempTags.push_back(tempTag.Value());
+ }
+
return new Save(
tempID.Value(),
tempDate.Value(),
@@ -368,7 +378,8 @@ Save * Client::GetSave(int saveID, int saveDate)
tempUsername.Value(),
tempName.Value(),
tempDescription.Value(),
- tempPublished.Value()
+ tempPublished.Value(),
+ tempTags
);
}
catch (json::Exception &e)