Merge pull request #43757 from KoBeWi/minimum_size_changed_bro
This commit is contained in:
commit
6ebbdb4a80
2 changed files with 7 additions and 0 deletions
|
@ -54,6 +54,7 @@ Size2 SubViewportContainer::get_minimum_size() const {
|
|||
|
||||
void SubViewportContainer::set_stretch(bool p_enable) {
|
||||
stretch = p_enable;
|
||||
update_minimum_size();
|
||||
queue_sort();
|
||||
update();
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/subviewport_container.h"
|
||||
#include "scene/main/canvas_layer.h"
|
||||
#include "scene/main/window.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
@ -3865,6 +3866,11 @@ Viewport::~Viewport() {
|
|||
|
||||
void SubViewport::set_size(const Size2i &p_size) {
|
||||
_set_size(p_size, _get_size_2d_override(), Rect2i(), _stretch_transform(), true);
|
||||
|
||||
SubViewportContainer *c = Object::cast_to<SubViewportContainer>(get_parent());
|
||||
if (c) {
|
||||
c->update_minimum_size();
|
||||
}
|
||||
}
|
||||
|
||||
Size2i SubViewport::get_size() const {
|
||||
|
|
Loading…
Reference in a new issue