mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
* clutter/clutter-model.c (clutter_model_set_sorting_column): This
function is supposed to accept -1 to disable sorting. However it checks for whether the column is >= the number of columns, but clutter_model_get_n_columns() returns an unsigned int so the column number also gets promoted to unsigned for the comparison. Therefore -1 is always greater than the number of columns so it wouldn't let you set it.
This commit is contained in:
parent
51563ba73e
commit
d6496254d6
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2008-07-30 Neil Roberts <neil@o-hand.com>
|
||||
|
||||
* clutter/clutter-model.c (clutter_model_set_sorting_column): This
|
||||
function is supposed to accept -1 to disable sorting. However it
|
||||
checks for whether the column is >= the number of columns, but
|
||||
clutter_model_get_n_columns() returns an unsigned int so the
|
||||
column number also gets promoted to unsigned for the
|
||||
comparison. Therefore -1 is always greater than the number of
|
||||
columns so it wouldn't let you set it.
|
||||
|
||||
2008-07-26 Neil Roberts <neil@o-hand.com>
|
||||
|
||||
* clutter/clutter-timeline.c (clutter_timeline_list_markers): When
|
||||
|
@ -1220,7 +1220,9 @@ clutter_model_set_sorting_column (ClutterModel *model,
|
||||
g_return_if_fail (CLUTTER_IS_MODEL (model));
|
||||
priv = model->priv;
|
||||
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
/* The extra comparison for >= 0 is because column gets promoted to
|
||||
unsigned in the second comparison */
|
||||
if (column >= 0 && column >= clutter_model_get_n_columns (model))
|
||||
{
|
||||
g_warning ("%s: Invalid column id value %d\n", G_STRLOC, column);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user