Skip to content

Commit

Permalink
glw/style: When switching style on widget also remove statements from…
Browse files Browse the repository at this point in the history
… style's ancestors
  • Loading branch information
andoma committed Mar 23, 2015
1 parent f308e90 commit 0ea577a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui/glw/glw_style.c
Expand Up @@ -1003,11 +1003,18 @@ glw_style_bind(glw_t *w, glw_style_t *gs, glw_view_eval_context_t *ec)
int r = 0;

int target_is_style = w->glw_class == &glw_style;
glw_style_t *old = w->glw_style;

if(w->glw_style != NULL) {
if(old != NULL) {

LIST_REMOVE(w, glw_style_link);
glw_style_remove_styling_rpns_on_widget(w, w->glw_style->gs_id);


do {
glw_style_remove_styling_rpns_on_widget(w, old->gs_id);
old = old->gs_ancestor;
} while(old != NULL);

glw_style_release(w->glw_style);
}

Expand Down

0 comments on commit 0ea577a

Please sign in to comment.