mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 02:40:07 +00:00
csscomputedvalues: Unset the section when setting a new value
Otherwise we end up with the wrong section if no new one is specified.
This commit is contained in:
parent
a2bef8ca51
commit
2f89505b54
@ -195,6 +195,12 @@ _gtk_css_computed_values_set_value (GtkCssComputedValues *values,
|
|||||||
if (dependencies & (GTK_CSS_DEPENDS_ON_FONT_SIZE))
|
if (dependencies & (GTK_CSS_DEPENDS_ON_FONT_SIZE))
|
||||||
values->depends_on_font_size = _gtk_bitmask_set (values->depends_on_font_size, id, TRUE);
|
values->depends_on_font_size = _gtk_bitmask_set (values->depends_on_font_size, id, TRUE);
|
||||||
|
|
||||||
|
if (values->sections && values->sections->len > id && g_ptr_array_index (values->sections, id))
|
||||||
|
{
|
||||||
|
gtk_css_section_unref (g_ptr_array_index (values->sections, id));
|
||||||
|
g_ptr_array_index (values->sections, id) = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (section)
|
if (section)
|
||||||
{
|
{
|
||||||
if (values->sections == NULL)
|
if (values->sections == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user