delete fade; fade = 0;
}
else {
- fade->update(fade->get_w(), mwindow->get_float_auto(this, AUTOMATION_FADE)->get_value(),
+ FloatAuto *previous = 0, *next = 0;
+ double unit_position = mwindow->edl->local_session->get_selectionstart(1);
+ int64_t unit_pos = vtrack->to_units(unit_position, 0);
+ FloatAutos *ptr = (FloatAutos*)track->automation->autos[AUTOMATION_FADE];
+ float value = ptr->get_value(unit_pos, PLAY_FORWARD, previous, next);
+ fade->update(fade->get_w(), value,
mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_VIDEO_FADE],
mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_VIDEO_FADE]);
}
VModePatch::VModePatch(MWindow *mwindow, VPatchGUI *patch, int x, int y)
: BC_PopupMenu(x, y, patch->patchbay->mode_icons[0]->get_w() + 20,
- "", 1, mwindow->theme->get_image_set("mode_popup", 0), 10)
+ "", 1, mwindow->theme->get_image_set("mode_popup", 0), 0)
{
this->mwindow = mwindow;
this->patch = patch;