diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-13 13:58:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-13 13:58:05 +0000 |
commit | edde9b59833183904ec7bd7fd49bb2bc8515f7e9 (patch) | |
tree | 1d197522b4a35b34e0fa6e261c8a259153510556 /gtk2_ardour | |
parent | f0484eee892027e50c2132efbaddbf974147345d (diff) |
destructive track work: regions now display offset by bwf timeline reference, cannot rec-enable before session start
git-svn-id: svn://localhost/ardour2/trunk@681 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 58 | ||||
-rw-r--r-- | gtk2_ardour/pan_automation_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/taperegionview.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/taperegionview.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view_item.h | 7 |
7 files changed, 55 insertions, 39 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 6c2919f5dd..8b6729cc4a 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2029,7 +2029,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event) drag_info.copied_location = new Location (*location); drag_info.pointer_frame_offset = drag_info.grab_frame - (is_start ? location->start() : location->end()); - + update_marker_drag_item (location); if (location->is_mark()) { @@ -2088,31 +2088,39 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) move_both = true; } - if (is_start) { // start marker + if (copy_location->is_mark()) { + /* just move it */ - if (move_both) { - copy_location->set_start (newframe); - copy_location->set_end (newframe + f_delta); - } else if (newframe < copy_location->end()) { - copy_location->set_start (newframe); - } else { - snap_to (next, 1, true); - copy_location->set_end (next); - copy_location->set_start (newframe); - } + copy_location->set_start (newframe); - } else { // end marker + } else { - if (move_both) { - copy_location->set_end (newframe); - copy_location->set_start (newframe - f_delta); - } else if (newframe > copy_location->start()) { - copy_location->set_end (newframe); + if (is_start) { // start-of-range marker + + if (move_both) { + copy_location->set_start (newframe); + copy_location->set_end (newframe + f_delta); + } else if (newframe < copy_location->end()) { + copy_location->set_start (newframe); + } else { + snap_to (next, 1, true); + copy_location->set_end (next); + copy_location->set_start (newframe); + } - } else if (newframe > 0) { - snap_to (next, -1, true); - copy_location->set_start (next); - copy_location->set_end (newframe); + } else { // end marker + + if (move_both) { + copy_location->set_end (newframe); + copy_location->set_start (newframe - f_delta); + } else if (newframe > copy_location->start()) { + copy_location->set_end (newframe); + + } else if (newframe > 0) { + snap_to (next, -1, true); + copy_location->set_start (next); + copy_location->set_end (newframe); + } } } @@ -2145,7 +2153,11 @@ Editor::marker_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event Location * location = find_location_from_marker (marker, is_start); if (location) { - location->set (drag_info.copied_location->start(), drag_info.copied_location->end()); + if (location->is_mark()) { + location->set_start (drag_info.copied_location->start()); + } else { + location->set (drag_info.copied_location->start(), drag_info.copied_location->end()); + } } session->add_redo_no_execute( session->locations()->get_memento() ); diff --git a/gtk2_ardour/pan_automation_time_axis.cc b/gtk2_ardour/pan_automation_time_axis.cc index ca6b6c7efe..a39f2996f8 100644 --- a/gtk2_ardour/pan_automation_time_axis.cc +++ b/gtk2_ardour/pan_automation_time_axis.cc @@ -88,7 +88,7 @@ PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEv _session.begin_reversible_command (_("add pan automation event")); _session.add_undo (alist.get_memento()); alist.add (when, y); - _session.add_undo (alist.get_memento()); + _session.add_redo_no_execute (alist.get_memento()); _session.commit_reversible_command (); _session.set_dirty (); } diff --git a/gtk2_ardour/taperegionview.cc b/gtk2_ardour/taperegionview.cc index 641d067350..228e45a9d5 100644 --- a/gtk2_ardour/taperegionview.cc +++ b/gtk2_ardour/taperegionview.cc @@ -42,16 +42,19 @@ using namespace PBD; using namespace Editing; using namespace ArdourCanvas; +const TimeAxisViewItem::Visibility TapeAudioRegionView::default_tape_visibility = TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameHighlight| + TimeAxisViewItem::ShowFrame| + TimeAxisViewItem::HideFrameRight| + TimeAxisViewItem::FullWidthNameHighlight); + TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView &tv, AudioRegion& r, double spu, Gdk::Color& basic_color) : AudioRegionView (parent, tv, r, spu, basic_color, - TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameHighlight| - TimeAxisViewItem::ShowFrame| - TimeAxisViewItem::HideFrameLR| - TimeAxisViewItem::FullWidthNameHighlight)) + TimeAxisViewItem::Visibility ((r.position() != 0) ? default_tape_visibility : + TimeAxisViewItem::Visibility (default_tape_visibility|TimeAxisViewItem::HideFrameLeft))) { } diff --git a/gtk2_ardour/taperegionview.h b/gtk2_ardour/taperegionview.h index 3e23e0fc19..6b4a57fc97 100644 --- a/gtk2_ardour/taperegionview.h +++ b/gtk2_ardour/taperegionview.h @@ -40,6 +40,8 @@ class TapeAudioRegionView : public AudioRegionView void set_frame_color (); void update (uint32_t n); + + static const TimeAxisViewItem::Visibility default_tape_visibility; }; #endif /* __gtk_ardour_tape_audio_region_view_h__ */ diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index f3f96e4065..047887abeb 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -661,8 +661,6 @@ TimeAxisView::show_selection (TimeSelection& ts) void TimeAxisView::reshow_selection (TimeSelection& ts) { - cerr << name() << ": reshow selection" << endl; - show_selection (ts); for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) { @@ -948,8 +946,6 @@ TimeAxisView::compute_controls_size_info () hSmaller = req.height + extra_height; - cerr << "hSmaller = " << hSmaller << endl; - window.remove (); window.add (two_row_table); diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index a0ceb27293..28fafcaa09 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -93,8 +93,6 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& NAME_HIGHLIGHT_SIZE = height + 6; NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 2; - cerr << "name highlight threshold = " << NAME_HIGHLIGHT_THRESH << endl; - have_name_font = true; } @@ -139,8 +137,12 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& uint32_t outline_what = 0x1|0x2|0x4|0x8; - if (visibility & HideFrameLR) { - outline_what &= ~(0x1 | 0x2); + if (visibility & HideFrameLeft) { + outline_what &= ~(0x1); + } + + if (visibility & HideFrameRight) { + outline_what &= ~(0x2); } if (visibility & HideFrameTB) { diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index b23350eef7..9ddb06876a 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -316,9 +316,10 @@ class TimeAxisViewItem : public Selectable ShowNameHighlight = 0x2, ShowNameText = 0x4, ShowHandles = 0x8, - HideFrameLR = 0x10, - HideFrameTB = 0x20, - FullWidthNameHighlight = 0x40 + HideFrameLeft = 0x10, + HideFrameRight = 0x20, + HideFrameTB = 0x40, + FullWidthNameHighlight = 0x80 }; /** |