disable pluginbox in RouteUI window when a track is frozen
This commit is contained in:
parent
06b4cf92db
commit
0889336aac
@ -25,6 +25,7 @@
|
||||
#include <gtkmm2ext/window_title.h>
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/audio_track.h"
|
||||
#include "ardour/plugin.h"
|
||||
#include "ardour/plugin_insert.h"
|
||||
#include "ardour/plugin_manager.h"
|
||||
@ -214,6 +215,25 @@ RouteParams_UI::route_property_changed (const PropertyChange& what_changed, boos
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteParams_UI::map_frozen()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &RouteParams_UI::map_frozen)
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(_route);
|
||||
if (at && insert_box) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
insert_box->set_sensitive (false);
|
||||
//hide_redirect_editors (); // TODO hide editor windows
|
||||
break;
|
||||
default:
|
||||
insert_box->set_sensitive (true);
|
||||
// XXX need some way, maybe, to retoggle redirect editors
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteParams_UI::setup_processor_boxes()
|
||||
{
|
||||
@ -226,6 +246,10 @@ RouteParams_UI::setup_processor_boxes()
|
||||
insert_box = new ProcessorBox (_session, boost::bind (&RouteParams_UI::plugin_selector, this), _rr_selection, 0);
|
||||
insert_box->set_route (_route);
|
||||
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(_route);
|
||||
if (at) {
|
||||
at->FreezeChange.connect (route_connections, invalidator (*this), boost::bind (&RouteParams_UI::map_frozen, this), gui_context());
|
||||
}
|
||||
redir_hpane.pack1 (*insert_box);
|
||||
|
||||
insert_box->ProcessorSelected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected));
|
||||
|
@ -127,6 +127,7 @@ class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
|
||||
|
||||
boost::shared_ptr<ARDOUR::Route> _route;
|
||||
PBD::ScopedConnection _route_processors_connection;
|
||||
PBD::ScopedConnectionList route_connections;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Processor> _processor;
|
||||
PBD::ScopedConnection _processor_going_away_connection;
|
||||
@ -163,6 +164,7 @@ class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
|
||||
|
||||
void route_property_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> route);
|
||||
void route_removed (boost::weak_ptr<ARDOUR::Route> route);
|
||||
void map_frozen ();
|
||||
|
||||
|
||||
void route_selected();
|
||||
|
Loading…
Reference in New Issue
Block a user