Fixed: Bezel state instance variable _bezelState must remove current state when changing to a new state (#3001)

If the bezel state was changed and some attribute was set like an "image". The image would not be found as there were two states active and it would not match.
This commit is contained in:
Martin Carlberg authored and GitHub committed 2021-11-23 13:42:36 +01:00
1 parent 3179d56879
commit ccc6007bab
1 file changed
+4
+4
View File
@@ -973,7 +973,11 @@ CPButtonImageOffset = 3.0;
_bezelStyle = aBezelStyle;
if (_bezelState && newState)
{
if (currentState)
_bezelState =_bezelState.without(currentState);
_bezelState = _bezelState.and(newState);
}
else
_bezelState = newState || CPThemeStateNormal;