diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-03 13:07:39 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-03 13:07:39 (GMT) |
| commit | 73c5082cbcdd3a986765723bd4182e45386ce766 (patch) | |
| tree | 99a0040636c9700a893044ebc36d949fa1da5873 /src/stamps | |
| parent | efddc12e5d2aadc5eee1927245ad38b9dee89aed (diff) | |
| download | powder-73c5082cbcdd3a986765723bd4182e45386ce766.zip powder-73c5082cbcdd3a986765723bd4182e45386ce766.tar.gz | |
Super, megaheavyweight thumbnail renderer
Diffstat (limited to 'src/stamps')
| -rw-r--r-- | src/stamps/StampsModel.cpp | 6 | ||||
| -rw-r--r-- | src/stamps/StampsView.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/stamps/StampsModel.cpp b/src/stamps/StampsModel.cpp index f76d4f1..b679d13 100644 --- a/src/stamps/StampsModel.cpp +++ b/src/stamps/StampsModel.cpp @@ -11,7 +11,8 @@ #include "StampsModelException.h" StampsModel::StampsModel(): - stamp(NULL) + stamp(NULL), + currentPage(1) { // TODO Auto-generated constructor stub stampIDs = Client::Ref().GetStamps(); @@ -27,6 +28,7 @@ void StampsModel::AddObserver(StampsView * observer) { observers.push_back(observer); observer->NotifyStampsListChanged(this); + observer->NotifyPageChanged(this); } void StampsModel::notifyStampsListChanged() @@ -61,6 +63,8 @@ void StampsModel::UpdateStampsList(int pageNumber) { std::vector<Save*> tempStampsList = stampsList; stampsList.clear(); + currentPage = pageNumber; + notifyPageChanged(); /*notifyStampsListChanged(); for(int i = 0; i < tempStampsList.size(); i++) { diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp index ddb3fb4..bddfb4f 100644 --- a/src/stamps/StampsView.cpp +++ b/src/stamps/StampsView.cpp @@ -87,13 +87,12 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; vector<Save*> saves = sender->GetStampsList(); - Client::Ref().ClearThumbnailRequests(); for(i = 0; i < stampButtons.size(); i++) { RemoveComponent(stampButtons[i]); delete stampButtons[i]; } - + stampButtons.clear(); buttonXOffset = 0; buttonYOffset = 50; buttonAreaWidth = Size.X; |
