Browse Source

Merge pull request #74890 from smix8/gridmap_cell_size_disconnect_error_4.x

Fix GridMap signal "cell_size_changed" disconnect error
Yuri Sizov 2 years ago
parent
commit
58b803cb94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gridmap/editor/grid_map_editor_plugin.cpp

+ 1 - 1
modules/gridmap/editor/grid_map_editor_plugin.cpp

@@ -913,7 +913,7 @@ void GridMapEditor::update_palette() {
 }
 
 void GridMapEditor::edit(GridMap *p_gridmap) {
-	if (node) {
+	if (node && node->is_connected("cell_size_changed", callable_mp(this, &GridMapEditor::_draw_grids))) {
 		node->disconnect("cell_size_changed", callable_mp(this, &GridMapEditor::_draw_grids));
 	}