mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
notify control protocols about plugin selection in a processor box
This commit is contained in:
parent
83984a7884
commit
caa0cc8790
2 changed files with 19 additions and 1 deletions
|
|
@ -77,6 +77,8 @@
|
|||
#include "ardour/types.h"
|
||||
#include "ardour/value_as_string.h"
|
||||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "LuaBridge/LuaBridge.h"
|
||||
|
||||
#include "actions.h"
|
||||
|
|
@ -1956,6 +1958,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
|
|||
*/
|
||||
|
||||
processor_display.set_data ("ardour-bindings", bindings);
|
||||
processor_display.SelectionAdded.connect (sigc::mem_fun (*this, &ProcessorBox::selection_added));
|
||||
|
||||
_width = Wide;
|
||||
processor_menu = 0;
|
||||
|
|
@ -2714,7 +2717,6 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry*
|
|||
ret = true;
|
||||
|
||||
} else if (processor && ev->button == 1 && selected) {
|
||||
|
||||
// this is purely informational but necessary for route params UI
|
||||
ProcessorSelected (processor); // emit
|
||||
|
||||
|
|
@ -4957,3 +4959,17 @@ ProcessorBox::load_bindings ()
|
|||
{
|
||||
bindings = Bindings::get_bindings (X_("Processor Box"));
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::selection_added (ProcessorEntry& pe)
|
||||
{
|
||||
std::shared_ptr<Processor> proc = pe.processor ();
|
||||
std::shared_ptr<PluginInsert> pi = std::dynamic_pointer_cast<PluginInsert> (proc);
|
||||
if (pi) {
|
||||
/* be explicit here about the fact that we're using a weak
|
||||
pointer, even though we probably don't need to be.
|
||||
*/
|
||||
std::weak_ptr<PluginInsert> wpi;
|
||||
ControlProtocol::PluginSelected (wpi);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -653,6 +653,8 @@ private:
|
|||
PBD::ScopedConnection amp_config_connection;
|
||||
|
||||
static bool _ignore_rb_change;
|
||||
|
||||
void selection_added (ProcessorEntry&);
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_processor_box__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue