[GB.GTK]
* BUG: Scrollbar and Slider correctly raise their Change event when their Value property is set manually. git-svn-id: svn://localhost/gambas/trunk@5559 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
371eaf9d4f
commit
02a5e3341d
1 changed files with 6 additions and 1 deletions
|
@ -29,11 +29,11 @@
|
|||
static void cb_change(GtkRange *range,gSlider *data)
|
||||
{
|
||||
int new_value = gtk_range_get_value(GTK_RANGE(data->widget));
|
||||
|
||||
if (data->_value == new_value)
|
||||
return;
|
||||
|
||||
data->_value = new_value;
|
||||
//fprintf(stderr, "value = %d\n", data->_value);
|
||||
if (data->onChange)
|
||||
data->onChange(data);
|
||||
}
|
||||
|
@ -222,8 +222,13 @@ void gSlider::setValue(int vl)
|
|||
else if (vl > _max)
|
||||
vl = _max;
|
||||
|
||||
if (_value == vl)
|
||||
return;
|
||||
|
||||
_value = vl;
|
||||
init();
|
||||
|
||||
emit(SIGNAL(onChange));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue