summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-01 02:41:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-01 02:41:31 +0000
commitb78d036aa056af0ef4f5821c45dae5f70bc69231 (patch)
tree639a9169028c22d827b316bb26cf03d8b2ba4a1a /gtk2_ardour/processor_box.cc
parentdeee47bcaea08eb94d25bc3c308c6c199b8e0708 (diff)
store void pointers to processor UIs in Processors, and reset ProcessorWindowProxy objects to use them, so that we can never create 2 windows (UIs) for the same processor
git-svn-id: svn://localhost/ardour2/branches/3.0@8638 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index ecd2319a5f..7dc2f4f25f 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -1197,6 +1197,17 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
w);
wp->marked = true;
+
+ /* if the processor already has an existing UI,
+ note that so that we don't recreate it
+ */
+
+ void* existing_ui = p->get_ui ();
+
+ if (existing_ui) {
+ wp->set (static_cast<Gtk::Window*>(existing_ui));
+ }
+
_processor_window_proxies.push_back (wp);
ARDOUR_UI::instance()->add_window_proxy (wp);
}
@@ -2234,6 +2245,9 @@ void
ProcessorBox::set_processor_ui (boost::shared_ptr<Processor> p, Gtk::Window* w)
{
list<ProcessorWindowProxy*>::iterator i = _processor_window_proxies.begin ();
+
+ p->set_ui (w);
+
while (i != _processor_window_proxies.end()) {
boost::shared_ptr<Processor> t = (*i)->processor().lock ();
if (t && t == p) {