make inclusion/exclusion of hidden children optional in Item::add_child_bounding_boxes
[ardour.git] / gtk2_ardour / processor_box.cc
index 852acf230f1de0323bf61909ccf2c3005aeb7041..8a34405e235fdced47ccac5f78403cf57bdf1821 100644 (file)
@@ -1518,6 +1518,7 @@ ProcessorEntry::PluginDisplay::PluginDisplay (ProcessorEntry& e, boost::shared_p
 {
        set_name ("processor prefader");
        add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
+       _plug->DropReferences.connect (_death_connection, invalidator (*this), boost::bind (&PluginDisplay::plugin_going_away, this), gui_context());
        _plug->QueueDraw.connect (_qdraw_connection, invalidator (*this),
                        boost::bind (&Gtk::Widget::queue_draw, this), gui_context ());
 
@@ -1547,7 +1548,7 @@ ProcessorEntry::PluginDisplay::on_button_press_event (GdkEventButton *ev)
        // select processor, then call (private)
        //_entry._parent->processor_button_press_event (ev, &_entry);
        if (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS)) {
-               if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
+               if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
                        _entry._parent->generic_edit_processor (_entry.processor ());
                } else {
                        _entry._parent->edit_processor (_entry.processor ());
@@ -1723,6 +1724,7 @@ ProcessorEntry::LuaPluginDisplay::render_inline (cairo_t *cr, uint32_t width)
        Cairo::Context ctx (cr);
        try {
                luabridge::LuaRef rv = (*_lua_render_inline)((Cairo::Context *)&ctx, width, _max_height);
+               lua_gui.collect_garbage_step ();
                if (rv.isTable ()) {
                        uint32_t h = rv[2];
                        return h;
@@ -2440,6 +2442,16 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
 void
 ProcessorBox::weird_plugin_dialog (Plugin& p, Route::ProcessorStreams streams)
 {
+       /* XXX this needs to be re-worked!
+        *
+        * With new pin-management "streams" is no longer correct.
+        * p.get_info () is also incorrect for variable i/o plugins (always -1,-1).
+        *
+        * Since pin-management was added, this dialog will only show in a very rare
+        * condition (non-replicated variable i/o configuration failed).
+        *
+        * TODO: simplify the message after the string-freeze is lifted.
+        */
        ArdourDialog dialog (_("Plugin Incompatibility"));
        Label label;