aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-04-26 20:42:11 +0200
committerThomas White <taw@bitwiz.me.uk>2019-04-26 20:42:11 +0200
commit40ad4aee216acf59fb0bba82fc1ad5de8c180e5e (patch)
tree19c7fb6387f95d3028993971a8efac3cf47223b3 /src
parentea7d1cf01bc3bb17e52259eb7f0d106c04180c5e (diff)
Clear tree store before adding style names
Diffstat (limited to 'src')
-rw-r--r--src/stylesheet_editor.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/stylesheet_editor.c b/src/stylesheet_editor.c
index 6d8a2b6..43413c8 100644
--- a/src/stylesheet_editor.c
+++ b/src/stylesheet_editor.c
@@ -203,16 +203,18 @@ static void set_values_from_presentation(StylesheetEditor *se)
GtkTreeIter iter;
GtkTreeIter iter2;
- gtk_tree_store_append(GTK_TREE_STORE(se->element_tree), &iter, NULL);
- gtk_tree_store_set(GTK_TREE_STORE(se->element_tree), &iter,
+ gtk_tree_store_clear(se->element_tree);
+
+ gtk_tree_store_append(se->element_tree, &iter, NULL);
+ gtk_tree_store_set(se->element_tree, &iter,
0, "Narrative", -1);
- gtk_tree_store_append(GTK_TREE_STORE(se->element_tree), &iter, NULL);
- gtk_tree_store_set(GTK_TREE_STORE(se->element_tree), &iter,
+ gtk_tree_store_append(se->element_tree, &iter, NULL);
+ gtk_tree_store_set(se->element_tree, &iter,
0, "Slide", -1);
- gtk_tree_store_append(GTK_TREE_STORE(se->element_tree), &iter2, &iter);
- gtk_tree_store_set(GTK_TREE_STORE(se->element_tree), &iter2,
+ gtk_tree_store_append(se->element_tree, &iter2, &iter);
+ gtk_tree_store_set(se->element_tree, &iter2,
0, "Slide title", -1);
set_geom_from_ss(se->priv->stylesheet, se->priv->el,