drag edit contraints relaxed for ripples, cwdw gui/tool deadlock fix, vpatchgui fader...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / vpatchgui.C
index 5fa6eb94355e40854b483fca6637c6221de9f0ae..774ac86bf33ca4c2cc41f1c2e8b49dc50cc27ee6 100644 (file)
@@ -96,7 +96,12 @@ int VPatchGUI::update(int x, int y)
                        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]);
                }
@@ -258,7 +263,7 @@ int VKeyFadeSlider::handle_event()
 
 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;