fix issue with Region::adjust_to_sync(); enlarge key bindings editor

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2732 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-11-30 22:54:10 +00:00
parent 6e235615c3
commit 008299e8a1
5 changed files with 8 additions and 6 deletions

View file

@ -1,4 +1,4 @@
; ardour-2.0beta11.1 GtkAccelMap rc-file -*- scheme -*-
; ardour GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/RegionList/RegionListSort" "")

View file

@ -1,4 +1,4 @@
; ardour-2.0beta11.1 GtkAccelMap rc-file -*- scheme -*-
; ardour GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/RegionList/RegionListSort" "")

View file

@ -3310,7 +3310,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
}
if (sync_frame - sync_offset <= sync_frame) {
pending_region_position = sync_frame - (sync_dir*sync_offset);
pending_region_position = sync_frame + (sync_dir*sync_offset);
} else {
pending_region_position = 0;
}

View file

@ -35,7 +35,7 @@ KeyEditor::KeyEditor ()
view.set_headers_visible (true);
view.get_selection()->set_mode (SELECTION_SINGLE);
view.set_reorderable (false);
view.set_size_request (300,200);
view.set_size_request (500,300);
view.set_enable_search (false);
view.set_rules_hint (true);
view.set_name (X_("KeyEditorTree"));

View file

@ -698,14 +698,16 @@ Region::adjust_to_sync (nframes_t pos)
{
int sync_dir;
nframes_t offset = sync_offset (sync_dir);
// cerr << "adjusting pos = " << pos << " to sync at " << _sync_position << " offset = " << offset << " with dir = " << sync_dir << endl;
if (sync_dir > 0) {
if (max_frames - pos > offset) {
pos += offset;
pos -= offset;
}
} else {
if (pos > offset) {
pos -= offset;
pos += offset;
} else {
pos = 0;
}