mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Fix crash on failed processor DnD. Fixes #3554.
git-svn-id: svn://localhost/ardour2/branches/3.0@8079 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0ee9f216d5
commit
d40e61c914
2 changed files with 32 additions and 21 deletions
|
|
@ -1064,32 +1064,42 @@ ProcessorBox::compute_processor_sort_keys ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route->reorder_processors (our_processors)) {
|
if (_route->reorder_processors (our_processors)) {
|
||||||
|
/* Reorder failed, so report this to the user. As far as I can see this must be done
|
||||||
|
in an idle handler: it seems that the redisplay_processors() that happens below destroys
|
||||||
|
widgets that were involved in the drag-and-drop on the processor list, which causes problems
|
||||||
|
when the drag is torn down after this handler function is finished.
|
||||||
|
*/
|
||||||
|
Glib::signal_idle().connect_once (sigc::mem_fun (*this, &ProcessorBox::report_failed_reorder));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* reorder failed, so redisplay */
|
void
|
||||||
|
ProcessorBox::report_failed_reorder ()
|
||||||
redisplay_processors ();
|
{
|
||||||
|
/* reorder failed, so redisplay */
|
||||||
/* now tell them about the problem */
|
|
||||||
|
redisplay_processors ();
|
||||||
ArdourDialog dialog (_("Plugin Incompatibility"));
|
|
||||||
Label label;
|
/* now tell them about the problem */
|
||||||
|
|
||||||
label.set_text (_("\
|
ArdourDialog dialog (_("Plugin Incompatibility"));
|
||||||
|
Label label;
|
||||||
|
|
||||||
|
label.set_text (_("\
|
||||||
You cannot reorder these plugins/sends/inserts\n\
|
You cannot reorder these plugins/sends/inserts\n\
|
||||||
in that way because the inputs and\n\
|
in that way because the inputs and\n\
|
||||||
outputs will not work correctly."));
|
outputs will not work correctly."));
|
||||||
|
|
||||||
dialog.get_vbox()->set_border_width (12);
|
dialog.get_vbox()->set_border_width (12);
|
||||||
dialog.get_vbox()->pack_start (label);
|
dialog.get_vbox()->pack_start (label);
|
||||||
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
|
dialog.add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||||
|
|
||||||
dialog.set_name (X_("PluginIODialog"));
|
dialog.set_name (X_("PluginIODialog"));
|
||||||
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
dialog.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
dialog.set_modal (true);
|
dialog.set_modal (true);
|
||||||
dialog.show_all ();
|
dialog.show_all ();
|
||||||
|
|
||||||
dialog.run ();
|
dialog.run ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||||
void redisplay_processors ();
|
void redisplay_processors ();
|
||||||
void add_processor_to_display (boost::weak_ptr<ARDOUR::Processor>);
|
void add_processor_to_display (boost::weak_ptr<ARDOUR::Processor>);
|
||||||
void reordered ();
|
void reordered ();
|
||||||
|
void report_failed_reorder ();
|
||||||
void route_processors_changed (ARDOUR::RouteProcessorChange);
|
void route_processors_changed (ARDOUR::RouteProcessorChange);
|
||||||
|
|
||||||
void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
|
void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue