You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
This commit is contained in:
committed by
AThousandShips
parent
0f95e9f8e6
commit
a1846b27ea
@@ -171,7 +171,7 @@ void TextureButton::_notification(int p_what) {
|
||||
bool draw_focus = (has_focus() && focused.is_valid());
|
||||
|
||||
// If no other texture is valid, try using focused texture.
|
||||
bool draw_focus_only = draw_focus && !texdraw.is_valid();
|
||||
bool draw_focus_only = draw_focus && texdraw.is_null();
|
||||
if (draw_focus_only) {
|
||||
texdraw = focused;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user