NLA Editor: Display "tweaking action" status indicator icon in place of action-type icon

Instead of displaying the "tweaking action" status indicator icon on the right hand
side jammed against the mapping/no-mapping toggle (pin), this is now displayed as in
place of the action icon used on the left (as the type indicator). This is less messy
than the previous situation, which was needed partly due to the abuse of an unsuited
icon.
This commit is contained in:
Joshua Leung 2014-05-04 19:28:14 +12:00
parent 2812e6a069
commit be7b09ef85
1 changed files with 5 additions and 8 deletions

View File

@ -652,7 +652,11 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
group = 5;
special = ICON_ACTION;
/* indicate tweaking-action state by changing the icon... */
if ((adt) && (adt->flag & ADT_NLA_EDIT_ON))
special = ICON_ACTION_TWEAK;
else
special = ICON_ACTION;
BLI_strncpy(name, act ? act->id.name + 2 : "<No Action>", sizeof(name));
@ -782,13 +786,6 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_PINNED);
else
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_UNPINNED);
fdrawline((float)(v2d->cur.xmax - offset), yminc,
(float)(v2d->cur.xmax - offset), ymaxc);
offset += 0.8f * U.widget_unit;
/* 'tweaking action' indicator - not a button */
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_ACTION_TWEAK);
}
else {
/* XXX firstly draw a little rect to help identify that it's different from the toggles */