13
0

virtualize editing connections to parameter changes

This commit is contained in:
Paul Davis 2024-11-12 10:47:08 -07:00
parent 677a6764ac
commit e7b10fc37d
4 changed files with 23 additions and 4 deletions

View File

@ -209,12 +209,28 @@ EditingContext::EditingContext (std::string const & name)
/* handle escape */
ARDOUR_UI::instance()->Escape.connect (escape_connection, MISSING_INVALIDATOR, std::bind (&EditingContext::escape, this), gui_context());
Config->ParameterChanged.connect (parameter_connections, MISSING_INVALIDATOR, std::bind (&EditingContext::parameter_changed, this, _1), gui_context());
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &EditingContext::ui_parameter_changed));
}
EditingContext::~EditingContext()
{
}
void
EditingContext::ui_parameter_changed (string parameter)
{
if (parameter == "sound-midi-note") {
}
}
void
EditingContext::parameter_changed (string parameter)
{
}
void
EditingContext::set_session (ARDOUR::Session* s)
{

View File

@ -686,6 +686,10 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider
uint32_t autoscroll_cnt;
ArdourCanvas::Rect autoscroll_boundary;
PBD::ScopedConnectionList parameter_connections;
virtual void parameter_changed (std::string);
virtual void ui_parameter_changed (std::string);
bool _mouse_changed_selection;
ArdourMarker* entered_marker;
TimeAxisView* entered_track;

View File

@ -744,9 +744,6 @@ Editor::Editor ()
Session::AskAboutPlaylistDeletion.connect_same_thread (*this, std::bind (&Editor::playlist_deletion_dialog, this, _1));
Route::PluginSetup.connect_same_thread (*this, std::bind (&Editor::plugin_setup, this, _1, _2, _3));
Config->ParameterChanged.connect (*this, invalidator (*this), std::bind (&Editor::parameter_changed, this, _1), gui_context());
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &Editor::ui_parameter_changed));
TimeAxisView::CatchDeletion.connect (*this, invalidator (*this), std::bind (&Editor::timeaxisview_deleted, this, _1), gui_context());
_ignore_region_action = false;
@ -5672,6 +5669,8 @@ Editor::zoom_vertical_modifier_released()
void
Editor::ui_parameter_changed (string parameter)
{
EditingContext::ui_parameter_changed (parameter);
if (parameter == "icon-set") {
while (!_cursor_stack.empty()) {
_cursor_stack.pop_back();

View File

@ -1097,7 +1097,7 @@ Editor::marker_click_behavior_chosen (Editing::MarkerClickBehavior m)
void
Editor::parameter_changed (std::string p)
{
ENSURE_GUI_THREAD (*this, &Editor::parameter_changed, p)
EditingContext::parameter_changed (p);
if (p == "auto-loop") {
update_loop_range_view ();