Temper pants - fix newly added lockup while dragging tempos sometimes.
authornick_m <mainsbridge@gmail.com>
Wed, 25 May 2016 01:30:12 +0000 (11:30 +1000)
committernick_m <mainsbridge@gmail.com>
Fri, 27 May 2016 13:38:17 +0000 (23:38 +1000)
gtk2_ardour/editor_drag.cc

index e7fa7023e120bb91a1d78c112f8b5d25309fca57..44ca5ad7708263935dfc0621ef7e0e033f24e6cb 100644 (file)
@@ -3311,8 +3311,6 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
 
        }
 
-       framepos_t pf;
-
        if (Keyboard::modifier_state_contains (event->button.state, ArdourKeyboard::constraint_modifier ())) {
                /* use vertical movement to alter tempo .. should be log */
                double new_bpm = _real_section->beats_per_minute() + ((last_pointer_y() - current_pointer_y()) / 5.0);
@@ -3326,7 +3324,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
                TempoMap& map (_editor->session()->tempo_map());
                const bool was_music = _real_section->position_lock_style() == MusicTime;
 
-               pf = adjusted_current_frame (event);
+               const framepos_t pf = adjusted_current_frame (event);
 
                if (!_editor->snap_musical()) {
 
@@ -3359,7 +3357,7 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
        /* this has moved the bar lines themselves, so recalibrate the offset */
        setup_pointer_frame_offset();
 
-       _marker->set_position (pf);
+       _marker->set_position (adjusted_current_frame (event, false));
 }
 
 void