* 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:
Benoît Minisini 2013-02-23 20:35:14 +00:00
parent 371eaf9d4f
commit 02a5e3341d

View file

@ -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));
}