diff --git a/src/client/Client.cpp b/src/client/Client.cpp index ef36249a5..b6408eaf0 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -1028,6 +1028,8 @@ SaveFile * Client::GetStamp(ByteString stampID) SaveFile *saveFile = LoadSaveFile(stampFile); if (!saveFile) saveFile = LoadSaveFile(stampID); + else + saveFile->SetDisplayName(stampID.FromUtf8()); return saveFile; } @@ -1123,6 +1125,7 @@ void Client::RescanStamps() stampIDs.push_front(name.Substr(0, 10)); } closedir(directory); + stampIDs.sort(std::greater()); updateStamps(); } } diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 7bfe55038..c926ba322 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -160,7 +160,7 @@ public: if (file->GetError().length()) new ErrorMessage("Error loading stamp", file->GetError()); else if (cc->localBrowser->GetMoveToFront()) - Client::Ref().MoveStampToFront(file->GetName()); + Client::Ref().MoveStampToFront(file->GetDisplayName().ToUtf8()); cc->LoadStamp(file->GetGameSave()); } }