projects
/
platform
/
core
/
csapi
/
tizenfx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b0080ef
)
[NUI] Fix ControlState equality issue. (#1795)
author
Jiyun Yang
<ji.yang@samsung.com>
Fri, 3 Jul 2020 06:30:35 +0000
(15:30 +0900)
committer
GitHub
<noreply@github.com>
Fri, 3 Jul 2020 06:30:35 +0000
(15:30 +0900)
This patch fixes such code working well.
```
ControlState a = ControlState.Normal + ControlState.Selected;
a == ControlState.Selected; // This should be true.
```
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
patch
|
blob
|
history
diff --git
a/src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
b/src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
index
06aa976
..
c844f06
100644
(file)
--- a/
src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
+++ b/
src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
@@
-149,6
+149,11
@@
namespace Tizen.NUI.BaseComponents
newState.stateList = newState.stateList.Distinct().ToList();
+ if (newState.stateList.Count == 1)
+ {
+ return newState.stateList[0];
+ }
+
return newState;
}