瀏覽代碼

Fix GridMap signal "cell_size_changed" disconnect error

Fixes GridMap signal "cell_size_changed" disconnect error.
smix8 2 年之前
父節點
當前提交
d8bad3eef5
共有 1 個文件被更改,包括 1 次插入1 次删除
  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));
 	}