File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3672,10 +3672,16 @@ void TileMapLayerEditor::_node_change(Node *p_node) {
36723672
36733673void TileMapLayerEditor::_notification (int p_what) {
36743674 switch (p_what) {
3675- case NOTIFICATION_READY : {
3675+ case NOTIFICATION_ENTER_TREE : {
36763676 get_tree ()->connect (" node_added" , callable_mp (this , &TileMapLayerEditor::_node_change));
36773677 get_tree ()->connect (" node_removed" , callable_mp (this , &TileMapLayerEditor::_node_change));
36783678 } break ;
3679+
3680+ case NOTIFICATION_EXIT_TREE: {
3681+ get_tree ()->disconnect (" node_added" , callable_mp (this , &TileMapLayerEditor::_node_change));
3682+ get_tree ()->disconnect (" node_removed" , callable_mp (this , &TileMapLayerEditor::_node_change));
3683+ } break ;
3684+
36793685 case NOTIFICATION_THEME_CHANGED: {
36803686 missing_tile_texture = get_editor_theme_icon (SNAME (" StatusWarning" ));
36813687 warning_pattern_texture = get_editor_theme_icon (SNAME (" WarningPattern" ));
You can’t perform that action at this time.
0 commit comments