There was a flag that prevent state updating while applying style.
But the flag seemed to have a bug : when style is disabled, the state updating is never going to be done.
This patch fixes the bug and changes the flag's name to be more contextual: styleApplied -> styleApplying.
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
private EventHandler<StateChangedEventArgs> stateChangeHandler;
private bool isPressed = false;
- private bool styleApplied = false;
+ private bool styleApplying = false;
/// <summary>
/// Gets accessibility name.
[EditorBrowsable(EditorBrowsableState.Never)]
protected void UpdateState()
{
- if (!styleApplied) return;
+ if (styleApplying) return;
ControlState sourceState = ControlState;
ControlState targetState;
{
Debug.Assert(buttonIcon != null && buttonText != null);
- styleApplied = false;
+ styleApplying = true;
base.ApplyStyle(viewStyle);
}
}
- styleApplied = true;
+ styleApplying = false;
UpdateState();
}