13
0

Remove some unused code.

git-svn-id: svn://localhost/ardour2/branches/3.0@7876 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-10-05 14:55:08 +00:00
parent 8222348761
commit 2d08273987
5 changed files with 0 additions and 36 deletions

View File

@ -2692,14 +2692,6 @@ MidiRegionView::note_mouse_position (float x_fraction, float y_fraction, bool ca
}
}
void
MidiRegionView::switch_source(boost::shared_ptr<Source> src)
{
boost::shared_ptr<MidiSource> msrc = boost::dynamic_pointer_cast<MidiSource>(src);
if (msrc)
display_model(msrc->model());
}
void
MidiRegionView::set_frame_color()
{

View File

@ -317,7 +317,6 @@ class MidiRegionView : public RegionView
bool play_midi_note_off(boost::shared_ptr<NoteType> note);
void clear_events();
void switch_source(boost::shared_ptr<ARDOUR::Source> src);
bool canvas_event(GdkEvent* ev);
bool note_canvas_event(GdkEvent* ev);

View File

@ -128,7 +128,6 @@ class MidiRegion : public Region
void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
void switch_source(boost::shared_ptr<Source> source);
void model_changed ();
void model_automation_state_changed (Evoral::Parameter const &);
void model_contents_changed ();

View File

@ -84,7 +84,6 @@ class Source : public SessionObject
virtual bool length_mutable() const { return false; }
static PBD::Signal1<void,Source*> SourceCreated;
PBD::Signal1<void,boost::shared_ptr<Source> > Switched;
bool has_been_analysed() const;
virtual bool can_be_analysed() const { return false; }

View File

@ -72,7 +72,6 @@ MidiRegion::MidiRegion (const SourceList& srcs)
{
register_properties ();
// midi_source(0)->Switched.connect_same_thread (*this, boost::bind (&MidiRegion::switch_source, this, _1));
midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
model_changed ();
assert(_name.val().find("/") == string::npos);
@ -86,7 +85,6 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t
register_properties ();
assert(_name.val().find("/") == string::npos);
// midi_source(0)->Switched.connect_same_thread (*this, boost::bind (&MidiRegion::switch_source, this, _1));
midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
model_changed ();
}
@ -257,29 +255,6 @@ MidiRegion::midi_source (uint32_t n) const
return boost::dynamic_pointer_cast<MidiSource>(source(n));
}
void
MidiRegion::switch_source(boost::shared_ptr<Source> src)
{
_source_connection.disconnect ();
boost::shared_ptr<MidiSource> msrc = boost::dynamic_pointer_cast<MidiSource>(src);
if (!msrc) {
return;
}
// MIDI regions have only one source
SourceList srcs;
srcs.push_back (msrc);
drop_sources ();
use_sources (srcs);
set_name (msrc->name());
msrc->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
}
void
MidiRegion::model_changed ()
{