Fix MeshInstance2D rect

This commit is contained in:
kobewi 2021-10-21 15:18:52 +02:00
parent 9c9ec63e1d
commit 1a347e9cf3
2 changed files with 5 additions and 0 deletions

View file

@ -96,6 +96,10 @@ Rect2 MeshInstance2D::_edit_get_rect() const {
return Node2D::_edit_get_rect();
}
bool MeshInstance2D::_edit_use_rect() const {
return mesh.is_valid();
}
#endif
MeshInstance2D::MeshInstance2D() {

View file

@ -48,6 +48,7 @@ protected:
public:
#ifdef TOOLS_ENABLED
virtual Rect2 _edit_get_rect() const override;
virtual bool _edit_use_rect() const override;
#endif
void set_mesh(const Ref<Mesh> &p_mesh);