summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorandrew-softdev <alastairmelville9@gmail.com>2021-01-03 15:13:35 +0000
committerKiritoAM <alastairmelville9@gmail.com>2021-01-03 15:44:36 +0000
commit15cffe060c24e4c7fe67746664340655dc39e29d (patch)
tree6746fa08077ad57eb55a7f5014662bb17885088b /editor/plugins
parent36c943260ed40c6e31a6ecff7f6e1674714b4fcb (diff)
Fix for reselecting a TileMap node without first de-selecting it
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp5
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 860b974632..85e7106162 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;
}
}