ControlLook: Check IsFocus() first
Otherwise we make two unnecessary function calls for every control in a window where only one of them is the focus control. Thanks Stippi.
This commit is contained in:
parent
59655dcbc4
commit
d38ba8f7dd
@ -87,8 +87,8 @@ BControlLook::Flags(BControl* control) const
|
||||
if (!control->IsEnabled())
|
||||
flags |= B_DISABLED;
|
||||
|
||||
if (control->Window() != NULL && control->Window()->IsActive()
|
||||
&& control->IsFocus()) {
|
||||
if (control->IsFocus() && control->Window() != NULL
|
||||
&& control->Window()->IsActive()) {
|
||||
flags |= B_FOCUSED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user