mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Update visibility icon properly
This commit is contained in:
@@ -541,10 +541,7 @@ void Spatial::show() {
|
||||
if (!is_inside_tree())
|
||||
return;
|
||||
|
||||
if (!data.parent || is_visible_in_tree()) {
|
||||
|
||||
_propagate_visibility_changed();
|
||||
}
|
||||
_propagate_visibility_changed();
|
||||
}
|
||||
|
||||
void Spatial::hide() {
|
||||
@@ -552,14 +549,14 @@ void Spatial::hide() {
|
||||
if (!data.visible)
|
||||
return;
|
||||
|
||||
bool was_visible = is_visible_in_tree();
|
||||
data.visible = false;
|
||||
|
||||
if (!data.parent || was_visible) {
|
||||
if (!is_inside_tree())
|
||||
return;
|
||||
|
||||
_propagate_visibility_changed();
|
||||
}
|
||||
_propagate_visibility_changed();
|
||||
}
|
||||
|
||||
bool Spatial::is_visible_in_tree() const {
|
||||
|
||||
const Spatial *s = this;
|
||||
|
||||
Reference in New Issue
Block a user