Commit ce3586fc authored by Morten Welinder's avatar Morten Welinder
Browse files

ConditionalStyle: Fix tracking problem when copying between sheets.

parent 47d6c7ab
2021-01-19 Morten Welinder <terra@gnome.org>
* src/mstyle.c (gnm_style_linked_sheet_changed): Make sure to tell
the GnmStyleConditions what is going on. Fixes #547, item 3.
2020-12-19 Morten Welinder <terra@gnome.org>
* src/sheet.c (sheet_range_unrender): New function.
......
......@@ -991,7 +991,13 @@ gnm_style_linked_sheet_changed (GnmStyle *style)
if (elem_is_set (style, MSTYLE_CONDITIONS) &&
style->conditions &&
gnm_style_conditions_get_sheet (style->conditions) != sheet) {
sheet_conditions_share_conditions_remove (style->conditions);
GnmStyleConditions *new_c = gnm_style_conditions_dup_to (style->conditions, sheet);
GnmStyleConditions *new_sc = sheet_conditions_share_conditions_add (new_c);
if (new_sc) {
g_object_unref (new_c);
new_c = new_sc;
}
gnm_style_set_conditions (style, new_c);
}
}
......
......@@ -246,7 +246,7 @@ sheet_conditions_share_conditions_remove (GnmStyleConditions *conds)
else if (n == 1)
g_hash_table_remove (cd->linked_conditions, conds);
else
g_warning ("We're confused with sheet condition usage.");
g_warning ("We're confused with sheet condition usage (%d).", n);
}
// ----------------------------------------------------------------------------
......
Supports Markdown
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