Merge pull request #81383 from AThousandShips/valid_remove
Remove unnecessary validity checks from `Button` and `TextureRect`
This commit is contained in:
commit
4bf3de7853
2 changed files with 4 additions and 8 deletions
|
@ -554,10 +554,8 @@ void Button::set_icon(const Ref<Texture2D> &p_icon) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::_texture_changed() {
|
void Button::_texture_changed() {
|
||||||
if (icon.is_valid()) {
|
queue_redraw();
|
||||||
queue_redraw();
|
update_minimum_size();
|
||||||
update_minimum_size();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<Texture2D> Button::get_icon() const {
|
Ref<Texture2D> Button::get_icon() const {
|
||||||
|
|
|
@ -189,10 +189,8 @@ bool TextureRect::_set(const StringName &p_name, const Variant &p_value) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void TextureRect::_texture_changed() {
|
void TextureRect::_texture_changed() {
|
||||||
if (texture.is_valid()) {
|
queue_redraw();
|
||||||
queue_redraw();
|
update_minimum_size();
|
||||||
update_minimum_size();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureRect::set_texture(const Ref<Texture2D> &p_tex) {
|
void TextureRect::set_texture(const Ref<Texture2D> &p_tex) {
|
||||||
|
|
Loading…
Reference in a new issue