Merge pull request #48609 from akien-mga/3.x-fix-tileset-signal-error
TileSet: Fix signal disconnect error in some situation
This commit is contained in:
commit
71f8b910ff
|
@ -3602,13 +3602,17 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
|
|||
if (p_visible) {
|
||||
tileset_editor_button->show();
|
||||
editor->make_bottom_panel_item_visible(tileset_editor);
|
||||
if (!get_tree()->is_connected("idle_frame", tileset_editor, "_on_workspace_process")) {
|
||||
get_tree()->connect("idle_frame", tileset_editor, "_on_workspace_process");
|
||||
}
|
||||
} else {
|
||||
editor->hide_bottom_panel();
|
||||
tileset_editor_button->hide();
|
||||
if (get_tree()->is_connected("idle_frame", tileset_editor, "_on_workspace_process")) {
|
||||
get_tree()->disconnect("idle_frame", tileset_editor, "_on_workspace_process");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary TileSetEditorPlugin::get_state() const {
|
||||
Dictionary state;
|
||||
|
|
Loading…
Reference in New Issue