summaryrefslogtreecommitdiff
path: root/src/search/SearchModel.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
commit9e1be78bc21d1fb76a19ce12ef36193aea6e2b93 (patch)
tree081b67d551bb44fecbf6deb99b6c44ea9789614c /src/search/SearchModel.cpp
parentb2d3257ae944a3ea3b57dc8ee4171b1b2f85483e (diff)
downloadpowder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.zip
powder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.tar.gz
I've got to a point where I can no longer be bothered to think of a proper commit comment
Diffstat (limited to 'src/search/SearchModel.cpp')
-rw-r--r--src/search/SearchModel.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp
index adb8cad..d9a4a1e 100644
--- a/src/search/SearchModel.cpp
+++ b/src/search/SearchModel.cpp
@@ -5,7 +5,8 @@
SearchModel::SearchModel():
currentSort("votes"),
- showOwn(false)
+ showOwn(false),
+ loadedSave(NULL)
{
}
@@ -30,6 +31,15 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query)
notifySaveListChanged();
}
+void SearchModel::SetLoadedSave(Save * save)
+{
+ loadedSave = save;
+}
+
+Save * SearchModel::GetLoadedSave(){
+ return loadedSave;
+}
+
vector<Save*> SearchModel::GetSaveList()
{
return saveList;
@@ -79,3 +89,9 @@ void SearchModel::notifyShowOwnChanged()
cObserver->NotifyShowOwnChanged(this);
}
}
+
+SearchModel::~SearchModel()
+{
+ if(loadedSave)
+ delete loadedSave;
+}