You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
TileSet: Fix signal disconnect error in some situation
Fixes second issue in #45938.
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
(cherry picked from commit 6e920d0c14)
This commit is contained in:
@@ -3584,11 +3584,15 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
|
|||||||
if (p_visible) {
|
if (p_visible) {
|
||||||
tileset_editor_button->show();
|
tileset_editor_button->show();
|
||||||
editor->make_bottom_panel_item_visible(tileset_editor);
|
editor->make_bottom_panel_item_visible(tileset_editor);
|
||||||
get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process");
|
if (!get_tree()->is_connected("idle_frame", tileset_editor, "_on_workspace_process")) {
|
||||||
|
get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
editor->hide_bottom_panel();
|
editor->hide_bottom_panel();
|
||||||
tileset_editor_button->hide();
|
tileset_editor_button->hide();
|
||||||
get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process");
|
if (get_tree()->is_connected("idle_frame", tileset_editor, "_on_workspace_process")) {
|
||||||
|
get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user