Fix T53544: Undo in pose mode selects all fcurves
This commit is contained in:
parent
9df2b6da3a
commit
642c315bae
Notes:
blender-bot
2023-02-14 09:19:09 +01:00
Referenced by issue #53544, undo on bones in pose mode selects all channels in graph editor
|
@ -6859,7 +6859,7 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
|
|||
/* force recalc of list of channels (i.e. includes calculating F-Curve colors)
|
||||
* thus preventing the "black curves" problem post-undo
|
||||
*/
|
||||
sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC;
|
||||
sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR;
|
||||
}
|
||||
else if (sl->spacetype == SPACE_BUTS) {
|
||||
SpaceButs *sbuts = (SpaceButs *)sl;
|
||||
|
|
|
@ -513,7 +513,7 @@ static void graph_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
|
|||
ED_area_tag_redraw(sa);
|
||||
break;
|
||||
case NC_WINDOW:
|
||||
if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC) {
|
||||
if (sipo->runtime.flag & (SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC | SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR)) {
|
||||
/* force redraw/refresh after undo/redo - prevents "black curve" problem */
|
||||
ED_area_tag_refresh(sa);
|
||||
}
|
||||
|
@ -676,6 +676,15 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
|
|||
ED_area_tag_redraw(sa);
|
||||
}
|
||||
|
||||
/* We could check 'SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR', but color is recalculated anyway. */
|
||||
if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR) {
|
||||
sipo->runtime.flag &= ~SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR;
|
||||
#if 0 /* Done below. */
|
||||
graph_refresh_fcurve_colors(C);
|
||||
#endif
|
||||
ED_area_tag_redraw(sa);
|
||||
}
|
||||
|
||||
/* init/adjust F-Curve colors */
|
||||
graph_refresh_fcurve_colors(C);
|
||||
}
|
||||
|
|
|
@ -407,6 +407,8 @@ typedef enum eGraphEdit_Mode {
|
|||
typedef enum eGraphEdit_Runtime_Flag {
|
||||
/** Temporary flag to force channel selections to be synced with main. */
|
||||
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC = (1 << 0),
|
||||
/** Temporary flag to force fcurves to recalculate colors. */
|
||||
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR = (1 << 1),
|
||||
} eGraphEdit_Runtime_Flag;
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue