13
0

don't update clocks while dragging playhead

git-svn-id: svn://localhost/ardour2/trunk@1183 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-12-01 17:32:41 +00:00
parent 927553f6b8
commit cba9116196
7 changed files with 22 additions and 5 deletions

View File

@ -1310,7 +1310,9 @@ ARDOUR_UI::start_engine ()
void
ARDOUR_UI::update_clocks ()
{
Clock (session->audible_frame()); /* EMIT_SIGNAL */
if (!editor || !editor->dragging_playhead()) {
Clock (session->audible_frame()); /* EMIT_SIGNAL */
}
}
void

View File

@ -308,6 +308,7 @@ Editor::Editor (AudioEngine& eng)
playhead_cursor = 0;
button_release_can_deselect = true;
canvas_idle_queued = false;
_dragging_playhead = false;
location_marker_color = color_map[cLocationMarker];
location_range_color = color_map[cLocationRange];

View File

@ -286,6 +286,7 @@ class Editor : public PublicEditor
void set_follow_playhead (bool yn);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
bool dragging_playhead () const { return _dragging_playhead; }
void toggle_waveform_visibility ();
void toggle_waveforms_while_recording ();
@ -1041,6 +1042,8 @@ class Editor : public PublicEditor
void region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
bool _dragging_playhead;
void cursor_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void cursor_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);

View File

@ -164,11 +164,16 @@ Editor::update_current_screen ()
frame = session->audible_frame();
if (_dragging_playhead) {
goto almost_done;
}
/* only update if the playhead is on screen or we are following it */
if (_follow_playhead) {
playhead_cursor->canvas_item.show();
playhead_cursor->canvas_item.show();
if (frame != last_update_frame) {
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
@ -198,6 +203,7 @@ Editor::update_current_screen ()
}
}
almost_done:
last_update_frame = frame;
if (current_mixer_strip) {

View File

@ -1942,8 +1942,10 @@ Editor::start_cursor_grab (ArdourCanvas::Item* item, GdkEvent* event)
Cursor* cursor = (Cursor *) drag_info.data;
if (session && cursor == playhead_cursor) {
if (drag_info.was_rolling) {
if (cursor == playhead_cursor) {
_dragging_playhead = true;
if (session && drag_info.was_rolling) {
session->request_stop ();
}
}
@ -1994,6 +1996,8 @@ Editor::cursor_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
if (drag_info.first_move) return;
cursor_drag_motion_callback (item, event);
_dragging_playhead = false;
if (item == &playhead_cursor->canvas_item) {
if (session) {

View File

@ -117,6 +117,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual void set_follow_playhead (bool yn) = 0;
virtual void toggle_follow_playhead () = 0;
virtual bool follow_playhead() const = 0;
virtual bool dragging_playhead() const = 0;
virtual void ensure_float (Gtk::Window&) = 0;
virtual void show_window () = 0;
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;

View File

@ -1,4 +1,4 @@
#ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__
static const char* ardour_svn_revision = "1173";
static const char* ardour_svn_revision = "1180";
#endif