Fixed issue that adding a value wouldn't remember the current interpolation mode
Closes #56
This commit is contained in:
parent
b35639dfba
commit
251d7b146a
@ -639,10 +639,13 @@ static void endEditing()
|
|||||||
key.value = (float)atof(s_editBuffer);
|
key.value = (float)atof(s_editBuffer);
|
||||||
key.type = 0;
|
key.type = 0;
|
||||||
|
|
||||||
if (is_key_frame(track, row_pos))
|
if (track->num_keys > 0)
|
||||||
{
|
{
|
||||||
int idx = key_idx_floor(track, row_pos);
|
int idx = sync_find_key(track, getRowPos());
|
||||||
key.type = track->keys[idx].type;
|
if (idx < 0)
|
||||||
|
idx = -idx - 1;
|
||||||
|
|
||||||
|
key.type = track->keys[emaxi(idx - 1, 0)].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
track_name = track->name;
|
track_name = track->name;
|
||||||
@ -1067,8 +1070,17 @@ static void onEnterCurrentValue()
|
|||||||
idx = -idx - 1;
|
idx = -idx - 1;
|
||||||
|
|
||||||
key.row = rowPos;
|
key.row = rowPos;
|
||||||
|
|
||||||
|
if (track->num_keys > 0)
|
||||||
|
{
|
||||||
key.value = sync_get_val(track, rowPos);
|
key.value = sync_get_val(track, rowPos);
|
||||||
key.type = track->keys[emaxi(idx - 1, 0)].type;
|
key.type = track->keys[emaxi(idx - 1, 0)].type;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
key.value = 0.0f;
|
||||||
|
key.type = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Commands_addOrUpdateKey(activeTrack, &key);
|
Commands_addOrUpdateKey(activeTrack, &key);
|
||||||
updateNeedsSaving();
|
updateNeedsSaving();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user