Commit 87a56f10 authored by Thibault Saunier's avatar Thibault Saunier

render: Keep restriction values sorted in the combobox

Reviewed-by: Alexandru Băluț's avatarAlex Băluț <>
Differential Revision:
parent a8de4ecd
......@@ -710,11 +710,14 @@ class RenderDialog(Loggable):
model_headers = [model.get_column_type(i) for i in range(model.get_n_columns())]
reduced_model = Gtk.ListStore(*model_headers)
reduced = []
for name, value in dict(model).items():
ecaps = Gst.Caps(caps_template_expander(caps_template, value))
if not caps.intersect(ecaps).is_empty():
reduced_model.append((name, value))
reduced.append((name, value))
for v in sorted(reduced, key=lambda v: float(v[1])):
set_combo_value(combo, value)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment