diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-05 10:48:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 10:48:41 +0100 |
commit | f4d8733777cc358a6a266391166961ba61f54bf4 (patch) | |
tree | 425df7f34fe0caf89d9ec6a28464dc9e8e5b4591 | |
parent | 43a2955e234d2719a44a20653b9bc5439f045fed (diff) | |
parent | 15cffe060c24e4c7fe67746664340655dc39e29d (diff) |
Merge pull request #44890 from KiritoAM/my-bug-fix
Fix for reselecting a TileMap node without first de-selecting it #44824
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index dffa796e8d..6a16aa28a9 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -39,7 +39,10 @@ #include "scene/gui/split_container.h" void TileMapEditor::_node_removed(Node *p_node) { - if (p_node == node) { + if (p_node == node && node) { + // Fixes #44824, which describes a situation where you can reselect a TileMap node without first de-selecting it when switching scenes. + node->disconnect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed)); + node = nullptr; } } |