Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix stamps not saving properly to stamps.def. Make "Rescan Stamps" so…
…rt stamps by time created
  • Loading branch information
jacob1 committed Jul 27, 2019
1 parent c696a11 commit a73d1f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/client/Client.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -1123,6 +1125,7 @@ void Client::RescanStamps()
stampIDs.push_front(name.Substr(0, 10));
}
closedir(directory);
stampIDs.sort(std::greater<ByteString>());
updateStamps();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/game/GameController.cpp
Expand Up @@ -160,7 +160,7 @@ class GameController::StampsCallback: public ControllerCallback
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());
}
}
Expand Down

0 comments on commit a73d1f9

Please sign in to comment.