multiselection: Don't emit nonsensical signals

I forgot to add a check here. We only want to emit
a ::selection-changed if we actually changed it.
This commit is contained in:
Matthias Clasen 2020-06-05 23:15:20 -04:00
parent 93abd8da59
commit b047b7838d

View File

@ -212,7 +212,8 @@ gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
}
while (n > 0);
gtk_selection_model_selection_changed (model, min, max - min + 1);
if (min <= max)
gtk_selection_model_selection_changed (model, min, max - min + 1);
return TRUE;
}