From 3145c3d8b9abebbc5c9bd4bd1202852c596a98da Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 8 May 2007 23:33:20 +0000 Subject: fix presentation of plugin UI's git-svn-id: svn://localhost/ardour2/branches/2.0.1@1800 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/redirect_box.cc | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index a120c271d1..a9baa02f9c 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -1066,7 +1066,12 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) send_ui = reinterpret_cast (send->get_gui()); } - send_ui->present (); + if (send_ui->is_visible()) { + send_ui->get_window()->raise (); + } else { + send_ui->show_all (); + send_ui->present (); + } } else { @@ -1105,9 +1110,13 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) } else { plugin_ui = reinterpret_cast (plugin_insert->get_gui()); } - - plugin_ui->present (); - + + if (plugin_ui->is_visible()) { + plugin_ui->get_window()->raise (); + } else { + plugin_ui->show_all (); + plugin_ui->present (); + } #ifdef HAVE_AUDIOUNIT } else if (type == ARDOUR::AudioUnit) { AUPluginUI* plugin_ui; @@ -1117,7 +1126,12 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) plugin_ui = reinterpret_cast (plugin_insert->get_gui()); } - plugin_ui->present (); + if (plugin_ui->is_visible()) { + plugin_ui->get_window()->raise (); + } else { + plugin_ui->show_all (); + plugin_ui->present (); + } #endif } else { warning << "Unsupported plugin sent to RedirectBox::edit_redirect()" << endmsg; @@ -1140,8 +1154,12 @@ RedirectBox::edit_redirect (boost::shared_ptr redirect) } else { io_selector = reinterpret_cast (port_insert->get_gui()); } - - io_selector->present (); + + if (io_selector->is_visible()) { + io_selector->get_window()->raise (); + } else { + io_selector->present (); + } } } } -- cgit v1.2.3