Ensure saves are expanded in memory when performing translate operations. Fixes #174
This commit is contained in:
parent
4e09a077a4
commit
1ac964d9ba
@ -297,6 +297,8 @@ char * GameSave::Serialise(int & dataSize)
|
|||||||
|
|
||||||
void GameSave::Transform(matrix2d transform, vector2d translate)
|
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;
|
int i, x, y, nx, ny, width = blockWidth*CELL, height = blockHeight*CELL, newWidth, newHeight, newBlockWidth, newBlockHeight;
|
||||||
vector2d pos, tmp, ctl, cbr, vel;
|
vector2d pos, tmp, ctl, cbr, vel;
|
||||||
vector2d cornerso[4];
|
vector2d cornerso[4];
|
||||||
|
@ -447,11 +447,15 @@ void GameController::DrawPoints(int toolSelection, queue<ui::Point*> & pointQueu
|
|||||||
void GameController::LoadClipboard()
|
void GameController::LoadClipboard()
|
||||||
{
|
{
|
||||||
gameModel->SetPlaceSave(gameModel->GetClipboard());
|
gameModel->SetPlaceSave(gameModel->GetClipboard());
|
||||||
|
if(gameModel->GetPlaceSave() && gameModel->GetPlaceSave()->Collapsed())
|
||||||
|
gameModel->GetPlaceSave()->Expand();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::LoadStamp()
|
void GameController::LoadStamp()
|
||||||
{
|
{
|
||||||
gameModel->SetPlaceSave(gameModel->GetStamp());
|
gameModel->SetPlaceSave(gameModel->GetStamp());
|
||||||
|
if(gameModel->GetPlaceSave() && gameModel->GetPlaceSave()->Collapsed())
|
||||||
|
gameModel->GetPlaceSave()->Expand();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::TranslateSave(ui::Point point)
|
void GameController::TranslateSave(ui::Point point)
|
||||||
|
Loading…
Reference in New Issue
Block a user