diff options
author | Carl Hetherington <carl@carlh.net> | 2010-09-01 22:35:46 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-09-01 22:35:46 +0000 |
commit | ba225736a40b869342eba68b2ed15d2d17aee94e (patch) | |
tree | fb8aa4ef09f25c1fd30c5ef8b39beee0af0267eb | |
parent | f645b4119e4f2b03d5cd24618253e2f8b4140262 (diff) |
Don't give automation region views left/right trim handles. Fixes #3428.
git-svn-id: svn://localhost/ardour2/branches/3.0@7727 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/region_view.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/region_view.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view_item.h | 3 |
5 files changed, 20 insertions, 13 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 2cc3059350..4b98a485de 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -41,7 +41,7 @@ AutomationRegionView::AutomationRegionView(ArdourCanvas::Group* boost::shared_ptr<ARDOUR::AutomationList> list, double spu, Gdk::Color const & basic_color) - : RegionView(parent, time_axis, region, spu, basic_color) + : RegionView(parent, time_axis, region, spu, basic_color, true) , _parameter(param) { if (list) { diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 890c16def6..12bd3e4ebe 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -64,8 +64,9 @@ RegionView::RegionView (ArdourCanvas::Group* parent, TimeAxisView& tv, boost::shared_ptr<ARDOUR::Region> r, double spu, - Gdk::Color const & basic_color) - : TimeAxisViewItem (r->name(), *parent, tv, spu, basic_color, r->position(), r->length(), false, + Gdk::Color const & basic_color, + bool automation) + : TimeAxisViewItem (r->name(), *parent, tv, spu, basic_color, r->position(), r->length(), false, automation, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText| TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowFrame)) , _region (r) diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h index 1cf392b534..02c08ae022 100644 --- a/gtk2_ardour/region_view.h +++ b/gtk2_ardour/region_view.h @@ -45,7 +45,8 @@ class RegionView : public TimeAxisViewItem TimeAxisView& time_view, boost::shared_ptr<ARDOUR::Region> region, double samples_per_unit, - Gdk::Color const & basic_color); + Gdk::Color const & basic_color, + bool automation = false); RegionView (const RegionView& other); RegionView (const RegionView& other, boost::shared_ptr<ARDOUR::Region> other_region); diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 164e4d2420..309b4dd1cb 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -83,19 +83,23 @@ TimeAxisViewItem::set_constant_heights () * Construct a new TimeAxisViewItem. * * @param it_name the unique name of this item - * @param parant the parent canvas group + * @param parent the parent canvas group * @param tv the TimeAxisView we are going to be added to * @param spu samples per unit * @param base_color * @param start the start point of this item * @param duration the duration of this item + * @param recording true if this is a recording region view + * @param automation true if this is an automation region view */ -TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color, - nframes64_t start, nframes64_t duration, bool recording, - Visibility vis) +TimeAxisViewItem::TimeAxisViewItem( + const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color, + nframes64_t start, nframes64_t duration, bool recording, bool automation, Visibility vis + ) : trackview (tv) , _height (1.0) , _recregion (recording) + , _automation (automation) { group = new ArdourCanvas::Group (parent); @@ -107,6 +111,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other) , PBD::ScopedConnectionList() , trackview (other.trackview) , _recregion (other._recregion) + , _automation (other._automation) { Gdk::Color c; @@ -167,10 +172,9 @@ TimeAxisViewItem::init ( frame->property_outline_pixels() = 1; frame->property_outline_what() = 0xF; - if(_recregion){ + if (_recregion) { frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get(); - } - else { + } else { frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get(); } @@ -204,7 +208,7 @@ TimeAxisViewItem::init ( } /* create our grab handles used for trimming/duration etc */ - if (!_recregion) { + if (!_recregion && !_automation) { frame_handle_start = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height()); frame_handle_start->property_outline_what() = 0x0; frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height()); diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 16b558c47b..65f112bc90 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -141,7 +141,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList protected: TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &, - nframes64_t, nframes64_t, bool recording = false, Visibility v = Visibility (0)); + nframes64_t, nframes64_t, bool recording = false, bool automation = false, Visibility v = Visibility (0)); TimeAxisViewItem (const TimeAxisViewItem&); @@ -237,6 +237,7 @@ protected: double _height; Visibility visibility; bool _recregion; + bool _automation; ///< true if this is an automation region view }; /* class TimeAxisViewItem */ |