mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
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
This commit is contained in:
parent
f645b4119e
commit
ba225736a4
5 changed files with 20 additions and 13 deletions
|
|
@ -41,7 +41,7 @@ AutomationRegionView::AutomationRegionView(ArdourCanvas::Group*
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> list,
|
boost::shared_ptr<ARDOUR::AutomationList> list,
|
||||||
double spu,
|
double spu,
|
||||||
Gdk::Color const & basic_color)
|
Gdk::Color const & basic_color)
|
||||||
: RegionView(parent, time_axis, region, spu, basic_color)
|
: RegionView(parent, time_axis, region, spu, basic_color, true)
|
||||||
, _parameter(param)
|
, _parameter(param)
|
||||||
{
|
{
|
||||||
if (list) {
|
if (list) {
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,9 @@ RegionView::RegionView (ArdourCanvas::Group* parent,
|
||||||
TimeAxisView& tv,
|
TimeAxisView& tv,
|
||||||
boost::shared_ptr<ARDOUR::Region> r,
|
boost::shared_ptr<ARDOUR::Region> r,
|
||||||
double spu,
|
double spu,
|
||||||
Gdk::Color const & basic_color)
|
Gdk::Color const & basic_color,
|
||||||
: TimeAxisViewItem (r->name(), *parent, tv, spu, basic_color, r->position(), r->length(), false,
|
bool automation)
|
||||||
|
: TimeAxisViewItem (r->name(), *parent, tv, spu, basic_color, r->position(), r->length(), false, automation,
|
||||||
TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText|
|
TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText|
|
||||||
TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowFrame))
|
TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowFrame))
|
||||||
, _region (r)
|
, _region (r)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ class RegionView : public TimeAxisViewItem
|
||||||
TimeAxisView& time_view,
|
TimeAxisView& time_view,
|
||||||
boost::shared_ptr<ARDOUR::Region> region,
|
boost::shared_ptr<ARDOUR::Region> region,
|
||||||
double samples_per_unit,
|
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);
|
||||||
RegionView (const RegionView& other, boost::shared_ptr<ARDOUR::Region> other_region);
|
RegionView (const RegionView& other, boost::shared_ptr<ARDOUR::Region> other_region);
|
||||||
|
|
|
||||||
|
|
@ -83,19 +83,23 @@ TimeAxisViewItem::set_constant_heights ()
|
||||||
* Construct a new TimeAxisViewItem.
|
* Construct a new TimeAxisViewItem.
|
||||||
*
|
*
|
||||||
* @param it_name the unique name of this item
|
* @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 tv the TimeAxisView we are going to be added to
|
||||||
* @param spu samples per unit
|
* @param spu samples per unit
|
||||||
* @param base_color
|
* @param base_color
|
||||||
* @param start the start point of this item
|
* @param start the start point of this item
|
||||||
* @param duration the duration 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,
|
TimeAxisViewItem::TimeAxisViewItem(
|
||||||
nframes64_t start, nframes64_t duration, bool recording,
|
const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
|
||||||
Visibility vis)
|
nframes64_t start, nframes64_t duration, bool recording, bool automation, Visibility vis
|
||||||
|
)
|
||||||
: trackview (tv)
|
: trackview (tv)
|
||||||
, _height (1.0)
|
, _height (1.0)
|
||||||
, _recregion (recording)
|
, _recregion (recording)
|
||||||
|
, _automation (automation)
|
||||||
{
|
{
|
||||||
group = new ArdourCanvas::Group (parent);
|
group = new ArdourCanvas::Group (parent);
|
||||||
|
|
||||||
|
|
@ -107,6 +111,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
||||||
, PBD::ScopedConnectionList()
|
, PBD::ScopedConnectionList()
|
||||||
, trackview (other.trackview)
|
, trackview (other.trackview)
|
||||||
, _recregion (other._recregion)
|
, _recregion (other._recregion)
|
||||||
|
, _automation (other._automation)
|
||||||
{
|
{
|
||||||
|
|
||||||
Gdk::Color c;
|
Gdk::Color c;
|
||||||
|
|
@ -167,10 +172,9 @@ TimeAxisViewItem::init (
|
||||||
frame->property_outline_pixels() = 1;
|
frame->property_outline_pixels() = 1;
|
||||||
frame->property_outline_what() = 0xF;
|
frame->property_outline_what() = 0xF;
|
||||||
|
|
||||||
if(_recregion){
|
if (_recregion) {
|
||||||
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
|
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 */
|
/* 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 = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
|
||||||
frame_handle_start->property_outline_what() = 0x0;
|
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());
|
frame_handle_end = new ArdourCanvas::SimpleRect (*group, 0.0, TimeAxisViewItem::GRAB_HANDLE_LENGTH, 5.0, trackview.current_height());
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &,
|
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&);
|
TimeAxisViewItem (const TimeAxisViewItem&);
|
||||||
|
|
||||||
|
|
@ -237,6 +237,7 @@ protected:
|
||||||
double _height;
|
double _height;
|
||||||
Visibility visibility;
|
Visibility visibility;
|
||||||
bool _recregion;
|
bool _recregion;
|
||||||
|
bool _automation; ///< true if this is an automation region view
|
||||||
|
|
||||||
}; /* class TimeAxisViewItem */
|
}; /* class TimeAxisViewItem */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue