Small cleanups.

git-svn-id: svn://localhost/ardour2/branches/3.0@8255 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-12-12 20:14:19 +00:00
parent b0c23c0646
commit 6fff4dcdda
4 changed files with 7 additions and 17 deletions

View File

@ -1074,21 +1074,16 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
double translated_x = (*ai)->when;
double translated_y = (*ai)->value;
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);
}
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
AutomationLine::reset ()
{

View File

@ -190,7 +190,6 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void list_changed ();
virtual bool event_handler (GdkEvent*);
virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract);
private:
std::list<ControlPoint*> _drag_points; ///< points we are dragging

View File

@ -20,7 +20,6 @@
#ifndef __gtk_ardour_automation_region_view_h__
#define __gtk_ardour_automation_region_view_h__
#include "ardour/diskstream.h"
#include "ardour/types.h"
#include "region_view.h"

View File

@ -24,12 +24,8 @@
#include <gtkmm2ext/gtk_ui.h>
#include "ardour/midi_playlist.h"
#include "ardour/midi_region.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 "automation_streamview.h"
@ -79,8 +75,9 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
if (wfd) {
boost::shared_ptr<MidiRegion> mr = boost::dynamic_pointer_cast<MidiRegion>(region);
if (mr)
if (mr) {
mr->midi_source()->load_model();
}
}
const boost::shared_ptr<AutomationControl> control = boost::dynamic_pointer_cast<AutomationControl> (