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
This commit is contained in:
Carl Hetherington 2012-01-09 01:33:24 +00:00
parent 5901b0ee76
commit b5c532972a
2 changed files with 11 additions and 19 deletions

View file

@ -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) {

View file

@ -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();