Check whether the the on_visibility changes signal is connected before attempting to connect it in data manager's main panel.

This commit is contained in:
Relintai 2022-01-26 19:40:36 +01:00
parent cdd8d73686
commit 58d707c695

View File

@ -22,7 +22,8 @@ var _initialized : bool = false
var _plugin : EditorPlugin = null
func _enter_tree():
connect("visibility_changed", self, "on_visibility_changed")
if !is_connected("visibility_changed", self, "on_visibility_changed"):
connect("visibility_changed", self, "on_visibility_changed")
func on_visibility_changed():
if _plugin && is_visible_in_tree() && !_initialized: