Reload tooltip in the symbol tree also on tag update

Because function return types are not used to determine tag equality,
we need to also update the tooltip of an existing tag otherwise the return
type doesn't get updated when changed.
This commit is contained in:
Jiří Techet 2015-04-19 18:53:42 +02:00
parent b6fc3e97df
commit 5d94d15976

View File

@ -1424,6 +1424,7 @@ static void update_tree_tags(GeanyDocument *doc, GList **tags)
{
const gchar *name;
const gchar *parent_name;
gchar *tooltip;
TMTag *found = found_item->data;
parent_name = get_parent_name(found, doc->file_type->id);
@ -1432,12 +1433,15 @@ static void update_tree_tags(GeanyDocument *doc, GList **tags)
parent_name = NULL;
/* only update fields that (can) have changed (name that holds line
* number, and the tag itself) */
* number, tooltip, and the tag itself) */
name = get_symbol_name(doc, found, parent_name != NULL);
tooltip = get_symbol_tooltip(doc, found);
gtk_tree_store_set(store, &iter,
SYMBOLS_COLUMN_NAME, name,
SYMBOLS_COLUMN_TOOLTIP, tooltip,
SYMBOLS_COLUMN_TAG, found,
-1);
g_free(tooltip);
update_parents_table(parents_table, found, parent_name, &iter);