You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible() is_visible_in_tree() - true when visible and parents visible show() hide() - for convenience
This commit is contained in:
@@ -78,7 +78,7 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
|
||||
|
||||
void EditorDirDialog::reload() {
|
||||
|
||||
if (!is_visible()) {
|
||||
if (!is_visible_in_tree()) {
|
||||
must_reload=true;
|
||||
return;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ void EditorDirDialog::_notification(int p_what) {
|
||||
}
|
||||
|
||||
if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
if (must_reload && is_visible()) {
|
||||
if (must_reload && is_visible_in_tree()) {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user