Ensure saves are expanded in memory when performing translate operations. Fixes #174

This commit is contained in:
Simon Robertshaw 2012-09-03 12:38:09 +01:00
parent 4e09a077a4
commit 1ac964d9ba
2 changed files with 6 additions and 0 deletions

View File

@ -297,6 +297,8 @@ char * GameSave::Serialise(int & dataSize)
void GameSave::Transform(matrix2d transform, vector2d translate)
{
if(Collapsed())
Expand();
int i, x, y, nx, ny, width = blockWidth*CELL, height = blockHeight*CELL, newWidth, newHeight, newBlockWidth, newBlockHeight;
vector2d pos, tmp, ctl, cbr, vel;
vector2d cornerso[4];

View File

@ -447,11 +447,15 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
void GameController::LoadClipboard()
{
gameModel->SetPlaceSave(gameModel->GetClipboard());
if(gameModel->GetPlaceSave() && gameModel->GetPlaceSave()->Collapsed())
gameModel->GetPlaceSave()->Expand();
}
void GameController::LoadStamp()
{
gameModel->SetPlaceSave(gameModel->GetStamp());
if(gameModel->GetPlaceSave() && gameModel->GetPlaceSave()->Collapsed())
gameModel->GetPlaceSave()->Expand();
}
void GameController::TranslateSave(ui::Point point)