File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/editors/xrSdkControls/Controls/ColorPicker Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ public sealed partial class ColorPicker : UserControl
99 {
1010 public delegate void ColorChangedEventHandler ( object sender , Color color ) ;
1111
12- private Color color ;
1312 private bool hexadecimal ;
1413 private bool ignoreOnChanged = false ;
1514 private bool alphaEnabled = true ;
@@ -24,18 +23,18 @@ public ColorPicker()
2423
2524 public Color Value
2625 {
27- get { return color ; }
26+ get { return pbColor . ColorSample ; }
2827 set
2928 {
30- if ( color == value )
29+ if ( pbColor . ColorSample == value )
3130 return ;
32- color = value ;
3331 ignoreOnChanged = true ;
3432 if ( alphaEnabled )
35- nslAlpha . Value = color . A ;
36- nslRed . Value = color . R ;
37- nslGreen . Value = color . G ;
38- nslBlue . Value = color . B ;
33+ nslAlpha . Value = value . A ;
34+ nslRed . Value = value . R ;
35+ nslGreen . Value = value . G ;
36+ nslBlue . Value = value . B ;
37+ pbColor . ColorSample = value ;
3938 ignoreOnChanged = false ;
4039 UpdateColor ( ) ;
4140 }
You can’t perform that action at this time.
0 commit comments