Fix GridMap signal "cell_size_changed" disconnect error

Fixes GridMap signal "cell_size_changed" disconnect error.

(cherry picked from commit d8bad3eef5)
This commit is contained in:
smix8 2023-03-14 04:08:54 +01:00 committed by Yuri Sizov
parent 22b5f0f608
commit dd94380b11

View File

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