1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +00:00

fix oversight that caused assertion fail when "moving" tiles from one layer to the same layer

should just ignore this case

glad i put in that assert there though
This commit is contained in:
fgenesis 2024-05-08 03:26:26 +02:00
parent 5c0237b4e5
commit 4ebce3e36b

View file

@ -1802,7 +1802,7 @@ void SceneEditor::action(int id, int state, int source, InputDevice device)
if (core->getShiftState()) if (core->getShiftState())
{ {
if(newLayer < MAX_TILE_LAYERS) if(newLayer < MAX_TILE_LAYERS && newLayer != bgLayer)
{ {
TileStorage& dst = dsq->tilemgr.tilestore[newLayer]; TileStorage& dst = dsq->tilemgr.tilestore[newLayer];
const size_t idx = ts.moveToOther(dst, &selectedTiles[0], N); const size_t idx = ts.moveToOther(dst, &selectedTiles[0], N);