diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-09 01:33:24 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-09 01:33:24 +0000 |
commit | b5c532972aa1942918b85e64092a3376dce3a6ae (patch) | |
tree | ba8b58e52aaa41e2074938ef3f81f4d989a1148e | |
parent | 5901b0ee764802d6f4176cd2512dea7cd39f0100 (diff) |
Account for ProcessorEntry::_processor being 0 in a few places; remove unused ProcessorBox::build_processor_tooltip.
git-svn-id: svn://localhost/ardour2/branches/3.0@11201 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/processor_box.cc | 29 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 1 |
2 files changed, 11 insertions, 19 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 4486077db8..a97f8d08b4 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -586,7 +586,9 @@ ProcessorBox::object_drop(DnDVBox<ProcessorEntry>* source, ProcessorEntry* posit list<ProcessorEntry*> children = source->selection (); list<boost::shared_ptr<Processor> > procs; for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) { - procs.push_back ((*i)->processor ()); + if ((*i)->processor ()) { + procs.push_back ((*i)->processor ()); + } } for (list<boost::shared_ptr<Processor> >::const_iterator i = procs.begin(); i != procs.end(); ++i) { @@ -1266,21 +1268,6 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p) processor_display.add_child (e); } - -void -ProcessorBox::build_processor_tooltip (EventBox& box, string start) -{ - string tip(start); - - list<ProcessorEntry*> children = processor_display.children (); - for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) { - tip += '\n'; - tip += (*i)->processor()->name(); - } - - ARDOUR_UI::instance()->set_tip (box, tip); -} - void ProcessorBox::reordered () { @@ -1314,8 +1301,10 @@ ProcessorBox::compute_processor_sort_keys () list<ProcessorEntry*> children = processor_display.children (); Route::ProcessorList our_processors; - for (list<ProcessorEntry*>::iterator iter = children.begin(); iter != children.end(); ++iter) { - our_processors.push_back ((*iter)->processor ()); + for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) { + if ((*i)->processor()) { + our_processors.push_back ((*i)->processor ()); + } } if (_route->reorder_processors (our_processors)) { @@ -2224,6 +2213,10 @@ ProcessorBox::route_property_changed (const PropertyChange& what_changed) processor = (*iter)->processor (); + if (!processor) { + continue; + } + Window* w = get_processor_ui (processor); if (!w) { diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index b2fde9c668..270b4147e0 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -277,7 +277,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD Gtk::Menu *processor_menu; gint processor_menu_map_handler (GdkEventAny *ev); Gtk::Menu * build_processor_menu (); - void build_processor_tooltip (Gtk::EventBox&, std::string); void show_processor_menu (int); Gtk::Menu* build_possible_aux_menu(); |