mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Small cleanups.
git-svn-id: svn://localhost/ardour2/branches/3.0@8255 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b0c23c0646
commit
6fff4dcdda
4 changed files with 7 additions and 17 deletions
|
|
@ -1075,20 +1075,15 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
|
||||||
double translated_y = (*ai)->value;
|
double translated_y = (*ai)->value;
|
||||||
model_to_view_coord (translated_x, translated_y);
|
model_to_view_coord (translated_x, translated_y);
|
||||||
|
|
||||||
add_model_point (tmp_points, (*ai)->when, translated_y);
|
tmp_points.push_back (ALPoint (
|
||||||
|
trackview.editor().frame_to_unit (_time_converter.to ((*ai)->when)),
|
||||||
|
_height - (translated_y * _height))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
determine_visible_control_points (tmp_points);
|
determine_visible_control_points (tmp_points);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
AutomationLine::add_model_point (ALPoints& tmp_points, double frame, double yfract)
|
|
||||||
{
|
|
||||||
tmp_points.push_back (ALPoint (trackview.editor().frame_to_unit (_time_converter.to(frame)),
|
|
||||||
_height - (yfract * _height)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AutomationLine::reset ()
|
AutomationLine::reset ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
||||||
void list_changed ();
|
void list_changed ();
|
||||||
|
|
||||||
virtual bool event_handler (GdkEvent*);
|
virtual bool event_handler (GdkEvent*);
|
||||||
virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::list<ControlPoint*> _drag_points; ///< points we are dragging
|
std::list<ControlPoint*> _drag_points; ///< points we are dragging
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
#ifndef __gtk_ardour_automation_region_view_h__
|
#ifndef __gtk_ardour_automation_region_view_h__
|
||||||
#define __gtk_ardour_automation_region_view_h__
|
#define __gtk_ardour_automation_region_view_h__
|
||||||
|
|
||||||
#include "ardour/diskstream.h"
|
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
|
|
||||||
#include "region_view.h"
|
#include "region_view.h"
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,8 @@
|
||||||
|
|
||||||
#include <gtkmm2ext/gtk_ui.h>
|
#include <gtkmm2ext/gtk_ui.h>
|
||||||
|
|
||||||
#include "ardour/midi_playlist.h"
|
|
||||||
#include "ardour/midi_region.h"
|
#include "ardour/midi_region.h"
|
||||||
#include "ardour/midi_source.h"
|
#include "ardour/midi_source.h"
|
||||||
#include "ardour/midi_diskstream.h"
|
|
||||||
#include "ardour/midi_track.h"
|
|
||||||
#include "ardour/smf_source.h"
|
|
||||||
#include "ardour/region_factory.h"
|
#include "ardour/region_factory.h"
|
||||||
|
|
||||||
#include "automation_streamview.h"
|
#include "automation_streamview.h"
|
||||||
|
|
@ -79,9 +75,10 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
|
||||||
|
|
||||||
if (wfd) {
|
if (wfd) {
|
||||||
boost::shared_ptr<MidiRegion> mr = boost::dynamic_pointer_cast<MidiRegion>(region);
|
boost::shared_ptr<MidiRegion> mr = boost::dynamic_pointer_cast<MidiRegion>(region);
|
||||||
if (mr)
|
if (mr) {
|
||||||
mr->midi_source()->load_model();
|
mr->midi_source()->load_model();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const boost::shared_ptr<AutomationControl> control = boost::dynamic_pointer_cast<AutomationControl> (
|
const boost::shared_ptr<AutomationControl> control = boost::dynamic_pointer_cast<AutomationControl> (
|
||||||
region->control (_controller->controllable()->parameter(), true)
|
region->control (_controller->controllable()->parameter(), true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue