slider does not change position if disabled
This commit is contained in:
parent
eae98a50d9
commit
2c57363efc
1 changed files with 4 additions and 0 deletions
|
@ -262,6 +262,10 @@ void gwinSliderSetPosition(GHandle gh, int pos) {
|
||||||
if (gh->vmt != (gwinVMT *)&sliderVMT)
|
if (gh->vmt != (gwinVMT *)&sliderVMT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// do not change the position if disabled
|
||||||
|
if (!gwinGetEnabled(gh))
|
||||||
|
return;
|
||||||
|
|
||||||
if (gsw->min <= gsw->max) {
|
if (gsw->min <= gsw->max) {
|
||||||
if (pos < gsw->min) gsw->pos = gsw->min;
|
if (pos < gsw->min) gsw->pos = gsw->min;
|
||||||
else if (pos > gsw->max) gsw->pos = gsw->max;
|
else if (pos > gsw->max) gsw->pos = gsw->max;
|
||||||
|
|
Loading…
Add table
Reference in a new issue