slider does not change position if disabled

ugfx_release_2.6
Joel Bodenmann 2014-04-30 21:11:54 +02:00
parent eae98a50d9
commit 2c57363efc
1 changed files with 4 additions and 0 deletions

View File

@ -262,6 +262,10 @@ void gwinSliderSetPosition(GHandle gh, int pos) {
if (gh->vmt != (gwinVMT *)&sliderVMT)
return;
// do not change the position if disabled
if (!gwinGetEnabled(gh))
return;
if (gsw->min <= gsw->max) {
if (pos < gsw->min) gsw->pos = gsw->min;
else if (pos > gsw->max) gsw->pos = gsw->max;