handle aux-send processor-box action

fixes http://tracker.ardour.org/view.php?id=5574
This commit is contained in:
Robin Gareus 2013-07-11 11:36:38 +02:00
parent 2b53ac2e31
commit b649f0a21b
2 changed files with 29 additions and 14 deletions

View File

@ -2031,7 +2031,7 @@ ProcessorBox::processor_can_be_edited (boost::shared_ptr<Processor> processor)
}
if (
(boost::dynamic_pointer_cast<Send> (processor) && !boost::dynamic_pointer_cast<InternalSend> (processor))||
boost::dynamic_pointer_cast<Send> (processor) ||
boost::dynamic_pointer_cast<Return> (processor) ||
boost::dynamic_pointer_cast<PluginInsert> (processor) ||
boost::dynamic_pointer_cast<PortInsert> (processor)
@ -2086,17 +2086,6 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
if (boost::dynamic_pointer_cast<InternalSend> (processor) == 0) {
gidget = new SendUIWindow (send, _session);
} else {
/* assign internal send to main fader */
if (_parent_strip) {
if (_parent_strip->current_delivery() == send) {
_parent_strip->revert_to_default_display ();
} else {
_parent_strip->show_send(send);
}
}
}
} else if ((retrn = boost::dynamic_pointer_cast<Return> (processor)) != 0) {
@ -2444,13 +2433,34 @@ ProcessorBox::rb_edit ()
_current_processor_box->for_selected_processors (&ProcessorBox::edit_processor);
}
bool
ProcessorBox::edit_aux_send (boost::shared_ptr<Processor> processor)
{
if (boost::dynamic_pointer_cast<InternalSend> (processor) == 0) {
return false;
}
if (_parent_strip) {
boost::shared_ptr<Send> send = boost::dynamic_pointer_cast<Send> (processor);
if (_parent_strip->current_delivery() == send) {
_parent_strip->revert_to_default_display ();
} else {
_parent_strip->show_send(send);
}
}
return true;
}
void
ProcessorBox::edit_processor (boost::shared_ptr<Processor> processor)
{
if (!processor) {
return;
}
if (edit_aux_send (processor)) {
return;
}
ProcessorWindowProxy* proxy = find_window_proxy (processor);
if (proxy) {
@ -2465,7 +2475,10 @@ ProcessorBox::generic_edit_processor (boost::shared_ptr<Processor> processor)
if (!processor) {
return;
}
if (edit_aux_send (processor)) {
return;
}
ProcessorWindowProxy* proxy = find_window_proxy (processor);
if (proxy) {

View File

@ -258,6 +258,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void hide_things ();
bool edit_aux_send(boost::shared_ptr<ARDOUR::Processor>);
/* Everything except a WindowProxy object should use this to get the window */
Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;