mirror of https://github.com/godotengine/godot
Merge pull request #69052 from Sauermann/fix-viewport-exit-tree-visibility
Fix Viewport visibility after entering/leaving scene-tree
This commit is contained in:
commit
9ddb6a925e
|
|
@ -227,6 +227,18 @@ void SubViewportContainer::unhandled_input(const Ref<InputEvent> &p_event) {
|
|||
}
|
||||
}
|
||||
|
||||
void SubViewportContainer::add_child_notify(Node *p_child) {
|
||||
if (Object::cast_to<SubViewport>(p_child)) {
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void SubViewportContainer::remove_child_notify(Node *p_child) {
|
||||
if (Object::cast_to<SubViewport>(p_child)) {
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
PackedStringArray SubViewportContainer::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ protected:
|
|||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
virtual void add_child_notify(Node *p_child) override;
|
||||
virtual void remove_child_notify(Node *p_child) override;
|
||||
|
||||
public:
|
||||
void set_stretch(bool p_enable);
|
||||
bool is_stretch_enabled() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue