mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 20:23:53 +00:00
Merge pull request #71630 from groud/fix_tilemap_layer_delete_undo
Fixes TileMap undo not restoring tiles
This commit is contained in:
commit
4abbc0c3fb
@ -2841,7 +2841,7 @@ void TileMap::_set_tile_data(int p_layer, const Vector<int> &p_data) {
|
||||
const int *r = p_data.ptr();
|
||||
|
||||
int offset = (format >= FORMAT_2) ? 3 : 2;
|
||||
ERR_FAIL_COND_MSG(c % offset != 0, "Corrupted tile data.");
|
||||
ERR_FAIL_COND_MSG(c % offset != 0, vformat("Corrupted tile data. Got size: %s. Expected modulo: %s", offset));
|
||||
|
||||
clear_layer(p_layer);
|
||||
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
FORMAT_2,
|
||||
FORMAT_3
|
||||
};
|
||||
mutable DataFormat format = FORMAT_1; // Assume lowest possible format if none is present;
|
||||
mutable DataFormat format = FORMAT_3;
|
||||
|
||||
static constexpr float FP_ADJUST = 0.00001;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user