Merge pull request #70601 from vmedea/keep-terrain-choice
Keep terrain choice when changing layer in tilemap editor
This commit is contained in:
commit
228db366bf
|
@ -3303,12 +3303,16 @@ void TileMapEditorTerrainsPlugin::_update_theme() {
|
|||
void TileMapEditorTerrainsPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_layer) {
|
||||
_stop_dragging(); // Avoids staying in a wrong drag state.
|
||||
|
||||
tile_map_id = p_tile_map_id;
|
||||
tile_map_layer = p_tile_map_layer;
|
||||
if (tile_map_id != p_tile_map_id) {
|
||||
tile_map_id = p_tile_map_id;
|
||||
|
||||
_update_terrains_cache();
|
||||
_update_terrains_tree();
|
||||
_update_tiles_list();
|
||||
// Clear the selection.
|
||||
_update_terrains_cache();
|
||||
_update_terrains_tree();
|
||||
_update_tiles_list();
|
||||
}
|
||||
|
||||
tile_map_layer = p_tile_map_layer;
|
||||
}
|
||||
|
||||
TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() {
|
||||
|
|
Loading…
Reference in New Issue