provide link-editor-and-mixer-selection option. gui implementation is slightly hacky because of the implicit endless loop that the link creates

git-svn-id: svn://localhost/ardour2/branches/3.0@10624 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-11-15 19:33:09 +00:00
parent a7359ed268
commit e2757229a7
18 changed files with 191 additions and 42 deletions

View file

@ -66,6 +66,9 @@ ARDOUR_UI::we_have_dependents ()
keyboard->setup_keybindings (); keyboard->setup_keybindings ();
editor->setup_tooltips (); editor->setup_tooltips ();
editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks));
editor->track_mixer_selection ();
mixer->track_editor_selection ();
} }
void void

View file

@ -35,7 +35,7 @@ ARDOUR_UI::create_mixer ()
{ {
try { try {
mixer = new Mixer_UI (); mixer = Mixer_UI::instance ();
} }
catch (failed_constructor& err) { catch (failed_constructor& err) {

View file

@ -108,6 +108,7 @@
#include "marker.h" #include "marker.h"
#include "midi_time_axis.h" #include "midi_time_axis.h"
#include "mixer_strip.h" #include "mixer_strip.h"
#include "mixer_ui.h"
#include "mouse_cursors.h" #include "mouse_cursors.h"
#include "playlist_selector.h" #include "playlist_selector.h"
#include "public_editor.h" #include "public_editor.h"
@ -282,6 +283,7 @@ Editor::Editor ()
, _last_cut_copy_source_track (0) , _last_cut_copy_source_track (0)
, _region_selection_change_updates_region_list (true) , _region_selection_change_updates_region_list (true)
, _following_mixer_selection (false)
{ {
constructed = false; constructed = false;
@ -5005,7 +5007,7 @@ Editor::foreach_time_axis_view (sigc::slot<void,TimeAxisView&> theslot)
/** Find a RouteTimeAxisView by the ID of its route */ /** Find a RouteTimeAxisView by the ID of its route */
RouteTimeAxisView* RouteTimeAxisView*
Editor::get_route_view_by_route_id (PBD::ID& id) const Editor::get_route_view_by_route_id (const PBD::ID& id) const
{ {
RouteTimeAxisView* v; RouteTimeAxisView* v;
@ -5499,3 +5501,4 @@ Editor::popup_control_point_context_menu (ArdourCanvas::Item* item, GdkEvent* ev
_control_point_context_menu.popup (event->button.button, event->button.time); _control_point_context_menu.popup (event->button.button, event->button.time);
} }

View file

@ -201,7 +201,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>); void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
void add_to_idle_resize (TimeAxisView*, int32_t); void add_to_idle_resize (TimeAxisView*, int32_t);
RouteTimeAxisView* get_route_view_by_route_id (PBD::ID& id) const; RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const;
void consider_auditioning (boost::shared_ptr<ARDOUR::Region>); void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
void hide_a_region (boost::shared_ptr<ARDOUR::Region>); void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
@ -269,6 +269,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Selection& get_selection() const { return *selection; } Selection& get_selection() const { return *selection; }
Selection& get_cut_buffer() const { return *cut_buffer; } Selection& get_cut_buffer() const { return *cut_buffer; }
void track_mixer_selection ();
bool extend_selection_to_track (TimeAxisView&); bool extend_selection_to_track (TimeAxisView&);
@ -2065,6 +2066,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void resize_text_widgets (); void resize_text_widgets ();
void follow_mixer_selection ();
bool _following_mixer_selection;
friend class Drag; friend class Drag;
friend class RegionDrag; friend class RegionDrag;
friend class RegionMoveDrag; friend class RegionMoveDrag;

View file

@ -27,6 +27,8 @@
#include "pbd/enumwriter.h" #include "pbd/enumwriter.h"
#include "ardour/rc_configuration.h"
#include "actions.h" #include "actions.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "audio_time_axis.h" #include "audio_time_axis.h"
@ -38,6 +40,7 @@
#include "gui_thread.h" #include "gui_thread.h"
#include "midi_time_axis.h" #include "midi_time_axis.h"
#include "mixer_strip.h" #include "mixer_strip.h"
#include "mixer_ui.h"
#include "selection.h" #include "selection.h"
#include "i18n.h" #include "i18n.h"
@ -251,3 +254,35 @@ Editor::mixer_strip_width_changed ()
editor_mixer_strip_width = current_mixer_strip->get_width_enum (); editor_mixer_strip_width = current_mixer_strip->get_width_enum ();
} }
void
Editor::track_mixer_selection ()
{
Mixer_UI::instance()->selection().RoutesChanged.connect (sigc::mem_fun (*this, &Editor::follow_mixer_selection));
}
void
Editor::follow_mixer_selection ()
{
if (!ARDOUR::Config->get_link_editor_and_mixer_selection() || _following_mixer_selection) {
return;
}
_following_mixer_selection = true;
selection->block_tracks_changed (true);
RouteUISelection& s (Mixer_UI::instance()->selection().routes);
selection->clear_tracks ();
for (RouteUISelection::iterator i = s.begin(); i != s.end(); ++i) {
TimeAxisView* tav = get_route_view_by_route_id ((*i)->route()->id());
if (tav) {
selection->add (tav);
}
}
_following_mixer_selection = false;
selection->block_tracks_changed (false);
selection->TracksChanged (); /* EMIT SIGNAL */
}

View file

@ -35,14 +35,14 @@ class MixerActor : virtual public sigc::trackable
MixerActor (); MixerActor ();
virtual ~MixerActor (); virtual ~MixerActor ();
RouteRedirectSelection& selection() { return _selection; } RouteProcessorSelection& selection() { return _selection; }
void register_actions (); void register_actions ();
void load_bindings (); void load_bindings ();
Gtkmm2ext::Bindings bindings; Gtkmm2ext::Bindings bindings;
protected: protected:
RouteRedirectSelection _selection; RouteProcessorSelection _selection;
RouteUISelection _route_targets; RouteUISelection _route_targets;
Gtkmm2ext::ActionMap myactions; Gtkmm2ext::ActionMap myactions;

View file

@ -47,6 +47,7 @@
#include "mixer_strip.h" #include "mixer_strip.h"
#include "monitor_section.h" #include "monitor_section.h"
#include "plugin_selector.h" #include "plugin_selector.h"
#include "public_editor.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "prompter.h" #include "prompter.h"
#include "utils.h" #include "utils.h"
@ -65,8 +66,21 @@ using namespace std;
using PBD::atoi; using PBD::atoi;
Mixer_UI* Mixer_UI::_instance = 0;
Mixer_UI*
Mixer_UI::instance ()
{
if (!_instance) {
_instance = new Mixer_UI;
}
return _instance;
}
Mixer_UI::Mixer_UI () Mixer_UI::Mixer_UI ()
: Window (Gtk::WINDOW_TOPLEVEL) : Window (Gtk::WINDOW_TOPLEVEL)
, _following_editor_selection (false)
{ {
/* allow this window to become the key focus window */ /* allow this window to become the key focus window */
set_flags (CAN_FOCUS); set_flags (CAN_FOCUS);
@ -238,6 +252,13 @@ Mixer_UI::~Mixer_UI ()
{ {
} }
void
Mixer_UI::track_editor_selection ()
{
PublicEditor::instance().get_selection().TracksChanged.connect (sigc::mem_fun (*this, &Mixer_UI::follow_editor_selection));
}
void void
Mixer_UI::ensure_float (Window& win) Mixer_UI::ensure_float (Window& win)
{ {
@ -431,6 +452,35 @@ Mixer_UI::sync_order_keys (string const & src)
} }
} }
void
Mixer_UI::follow_editor_selection ()
{
if (!Config->get_link_editor_and_mixer_selection() || _following_editor_selection) {
return;
}
_following_editor_selection = true;
_selection.block_routes_changed (true);
TrackSelection& s (PublicEditor::instance().get_selection().tracks);
_selection.clear_routes ();
for (TrackViewList::iterator i = s.begin(); i != s.end(); ++i) {
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*i);
if (rtav) {
MixerStrip* ms = strip_by_route (rtav->route());
if (ms) {
_selection.add (ms);
}
}
}
_following_editor_selection = false;
_selection.block_routes_changed (false);
}
MixerStrip* MixerStrip*
Mixer_UI::strip_by_route (boost::shared_ptr<Route> r) Mixer_UI::strip_by_route (boost::shared_ptr<Route> r)
{ {

View file

@ -55,10 +55,11 @@ class MonitorSection;
class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
{ {
public: public:
Mixer_UI (); static Mixer_UI* instance();
~Mixer_UI(); ~Mixer_UI();
void set_session (ARDOUR::Session *); void set_session (ARDOUR::Session *);
void track_editor_selection ();
PluginSelector* plugin_selector(); PluginSelector* plugin_selector();
@ -86,6 +87,9 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
void set_route_targets_for_operation (); void set_route_targets_for_operation ();
private: private:
Mixer_UI ();
static Mixer_UI* _instance;
bool _visible; bool _visible;
Gtk::HBox global_hpacker; Gtk::HBox global_hpacker;
@ -146,8 +150,6 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
void strip_select_op (bool audiotrack, bool select); void strip_select_op (bool audiotrack, bool select);
void select_strip_op (MixerStrip*, bool select); void select_strip_op (MixerStrip*, bool select);
void follow_strip_selection ();
gint start_updating (); gint start_updating ();
gint stop_updating (); gint stop_updating ();
@ -270,6 +272,9 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
MixerStrip* strip_by_x (int x); MixerStrip* strip_by_x (int x);
friend class MixerGroupTabs; friend class MixerGroupTabs;
void follow_editor_selection ();
bool _following_editor_selection;
}; };
#endif /* __ardour_mixer_ui_h__ */ #endif /* __ardour_mixer_ui_h__ */

View file

@ -460,7 +460,7 @@ PluginInsertProcessorEntry::SplittingIcon::on_expose_event (GdkEventExpose* ev)
} }
ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelector*()> get_plugin_selector, ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelector*()> get_plugin_selector,
RouteRedirectSelection& rsel, MixerStrip* parent, bool owner_is_mixer) RouteProcessorSelection& rsel, MixerStrip* parent, bool owner_is_mixer)
: _parent_strip (parent) : _parent_strip (parent)
, _owner_is_mixer (owner_is_mixer) , _owner_is_mixer (owner_is_mixer)
, ab_direction (true) , ab_direction (true)

View file

@ -58,7 +58,7 @@
class MotionController; class MotionController;
class PluginSelector; class PluginSelector;
class PluginUIWindow; class PluginUIWindow;
class RouteRedirectSelection; class RouteProcessorSelection;
class MixerStrip; class MixerStrip;
namespace ARDOUR { namespace ARDOUR {
@ -205,7 +205,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
}; };
ProcessorBox (ARDOUR::Session*, boost::function<PluginSelector*()> get_plugin_selector, ProcessorBox (ARDOUR::Session*, boost::function<PluginSelector*()> get_plugin_selector,
RouteRedirectSelection&, MixerStrip* parent, bool owner_is_mixer = false); RouteProcessorSelection&, MixerStrip* parent, bool owner_is_mixer = false);
~ProcessorBox (); ~ProcessorBox ();
void set_route (boost::shared_ptr<ARDOUR::Route>); void set_route (boost::shared_ptr<ARDOUR::Route>);
@ -253,7 +253,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
*/ */
int _placement; int _placement;
RouteRedirectSelection& _rr_selection; RouteProcessorSelection& _rr_selection;
void route_going_away (); void route_going_away ();

View file

@ -203,6 +203,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual gulong frame_to_pixel (framepos_t frame) const = 0; virtual gulong frame_to_pixel (framepos_t frame) const = 0;
virtual Selection& get_selection () const = 0; virtual Selection& get_selection () const = 0;
virtual Selection& get_cut_buffer () const = 0; virtual Selection& get_cut_buffer () const = 0;
virtual void track_mixer_selection () = 0;
virtual bool extend_selection_to_track (TimeAxisView&) = 0; virtual bool extend_selection_to_track (TimeAxisView&) = 0;
virtual void play_selection () = 0; virtual void play_selection () = 0;
virtual void set_show_measures (bool yn) = 0; virtual void set_show_measures (bool yn) = 0;
@ -286,7 +287,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual TimeAxisView* get_named_time_axis(const std::string & name) = 0; virtual TimeAxisView* get_named_time_axis(const std::string & name) = 0;
#endif #endif
virtual RouteTimeAxisView* get_route_view_by_route_id (PBD::ID& id) const = 0; virtual RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const = 0;
virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, PBD::PropertyID) const = 0; virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, PBD::PropertyID) const = 0;

View file

@ -1107,6 +1107,14 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_all_route_ordering) sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_all_route_ordering)
)); ));
add_option (_("Editor"),
new BoolOption (
"link-editor-and-mixer-selection",
_("Synchronise editor and mixer selection"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_editor_and_mixer_selection),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_editor_and_mixer_selection)
));
add_option (_("Editor"), add_option (_("Editor"),
new BoolOption ( new BoolOption (
"name-new-markers", "name-new-markers",

View file

@ -123,7 +123,7 @@ class RouteParams_UI : public ArdourDialog, public PBD::ScopedConnectionList
IOSelector * _output_iosel; IOSelector * _output_iosel;
PluginSelector *_plugin_selector; PluginSelector *_plugin_selector;
RouteRedirectSelection _rr_selection; RouteProcessorSelection _rr_selection;
boost::shared_ptr<ARDOUR::Route> _route; boost::shared_ptr<ARDOUR::Route> _route;
PBD::ScopedConnection _route_processors_connection; PBD::ScopedConnection _route_processors_connection;

View file

@ -36,8 +36,13 @@ using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
using namespace PBD; using namespace PBD;
RouteRedirectSelection& RouteProcessorSelection::RouteProcessorSelection()
RouteRedirectSelection::operator= (const RouteRedirectSelection& other) : _no_route_change_signal (false)
{
}
RouteProcessorSelection&
RouteProcessorSelection::operator= (const RouteProcessorSelection& other)
{ {
if (&other != this) { if (&other != this) {
processors = other.processors; processors = other.processors;
@ -47,39 +52,41 @@ RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
} }
bool bool
operator== (const RouteRedirectSelection& a, const RouteRedirectSelection& b) operator== (const RouteProcessorSelection& a, const RouteProcessorSelection& b)
{ {
// XXX MUST TEST PROCESSORS SOMEHOW // XXX MUST TEST PROCESSORS SOMEHOW
return a.routes == b.routes; return a.routes == b.routes;
} }
void void
RouteRedirectSelection::clear () RouteProcessorSelection::clear ()
{ {
clear_processors (); clear_processors ();
clear_routes (); clear_routes ();
} }
void void
RouteRedirectSelection::clear_processors () RouteProcessorSelection::clear_processors ()
{ {
processors.clear (); processors.clear ();
ProcessorsChanged (); ProcessorsChanged ();
} }
void void
RouteRedirectSelection::clear_routes () RouteProcessorSelection::clear_routes ()
{ {
for (RouteUISelection::iterator i = routes.begin(); i != routes.end(); ++i) { for (RouteUISelection::iterator i = routes.begin(); i != routes.end(); ++i) {
(*i)->set_selected (false); (*i)->set_selected (false);
} }
routes.clear (); routes.clear ();
drop_connections (); drop_connections ();
if (!_no_route_change_signal) {
RoutesChanged (); RoutesChanged ();
}
} }
void void
RouteRedirectSelection::add (XMLNode* node) RouteProcessorSelection::add (XMLNode* node)
{ {
// XXX check for duplicate // XXX check for duplicate
processors.add (node); processors.add (node);
@ -87,7 +94,7 @@ RouteRedirectSelection::add (XMLNode* node)
} }
void void
RouteRedirectSelection::set (XMLNode* node) RouteProcessorSelection::set (XMLNode* node)
{ {
clear_processors (); clear_processors ();
processors.set (node); processors.set (node);
@ -95,7 +102,7 @@ RouteRedirectSelection::set (XMLNode* node)
} }
void void
RouteRedirectSelection::add (RouteUI* r) RouteProcessorSelection::add (RouteUI* r)
{ {
if (find (routes.begin(), routes.end(), r) == routes.end()) { if (find (routes.begin(), routes.end(), r) == routes.end()) {
if (routes.insert (r).second) { if (routes.insert (r).second) {
@ -104,43 +111,52 @@ RouteRedirectSelection::add (RouteUI* r)
MixerStrip* ms = dynamic_cast<MixerStrip*> (r); MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
if (ms) { if (ms) {
ms->CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RouteRedirectSelection::remove, this, _1), gui_context()); ms->CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RouteProcessorSelection::remove, this, _1), gui_context());
} }
if (!_no_route_change_signal) {
RoutesChanged(); RoutesChanged();
} }
} }
}
} }
void void
RouteRedirectSelection::remove (RouteUI* r) RouteProcessorSelection::remove (RouteUI* r)
{ {
ENSURE_GUI_THREAD (*this, &RouteRedirectSelection::remove, r); ENSURE_GUI_THREAD (*this, &RouteProcessorSelection::remove, r);
RouteUISelection::iterator i; RouteUISelection::iterator i;
if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) { if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) {
routes.erase (i); routes.erase (i);
(*i)->set_selected (false); (*i)->set_selected (false);
if (!_no_route_change_signal) {
RoutesChanged (); RoutesChanged ();
} }
}
} }
void void
RouteRedirectSelection::set (RouteUI* r) RouteProcessorSelection::set (RouteUI* r)
{ {
clear_routes (); clear_routes ();
add (r); add (r);
} }
bool bool
RouteRedirectSelection::selected (RouteUI* r) RouteProcessorSelection::selected (RouteUI* r)
{ {
return find (routes.begin(), routes.end(), r) != routes.end(); return find (routes.begin(), routes.end(), r) != routes.end();
} }
bool bool
RouteRedirectSelection::empty () RouteProcessorSelection::empty ()
{ {
return processors.empty () && routes.empty (); return processors.empty () && routes.empty ();
} }
void
RouteProcessorSelection::block_routes_changed (bool yn)
{
_no_route_change_signal = yn;
}

View file

@ -26,19 +26,21 @@
#include "processor_selection.h" #include "processor_selection.h"
#include "route_ui_selection.h" #include "route_ui_selection.h"
class RouteRedirectSelection : public PBD::ScopedConnectionList, public sigc::trackable class RouteProcessorSelection : public PBD::ScopedConnectionList, public sigc::trackable
{ {
public: public:
ProcessorSelection processors; ProcessorSelection processors;
RouteUISelection routes; RouteUISelection routes;
RouteRedirectSelection() {} RouteProcessorSelection();
RouteRedirectSelection& operator= (const RouteRedirectSelection& other); RouteProcessorSelection& operator= (const RouteProcessorSelection& other);
sigc::signal<void> ProcessorsChanged; sigc::signal<void> ProcessorsChanged;
sigc::signal<void> RoutesChanged; sigc::signal<void> RoutesChanged;
void block_routes_changed (bool);
void clear (); void clear ();
bool empty(); bool empty();
@ -56,9 +58,10 @@ class RouteRedirectSelection : public PBD::ScopedConnectionList, public sigc::tr
private: private:
void removed (RouteUI*); void removed (RouteUI*);
bool _no_route_change_signal;
}; };
bool operator==(const RouteRedirectSelection& a, const RouteRedirectSelection& b); bool operator==(const RouteProcessorSelection& a, const RouteProcessorSelection& b);
#endif /* __ardour_gtk_route_processor_selection_h__ */ #endif /* __ardour_gtk_route_processor_selection_h__ */

View file

@ -51,6 +51,7 @@ Selection::Selection (const PublicEditor* e)
: tracks (e) : tracks (e)
, editor (e) , editor (e)
, next_time_id (0) , next_time_id (0)
, _no_tracks_changed (false)
{ {
clear (); clear ();
@ -129,8 +130,10 @@ Selection::clear_tracks ()
{ {
if (!tracks.empty()) { if (!tracks.empty()) {
tracks.clear (); tracks.clear ();
if (!_no_tracks_changed) {
TracksChanged(); TracksChanged();
} }
}
} }
void void
@ -231,7 +234,9 @@ Selection::toggle (TimeAxisView* track)
tracks.erase (i); tracks.erase (i);
} }
if (!_no_tracks_changed) {
TracksChanged(); TracksChanged();
}
} }
void void
@ -353,8 +358,10 @@ Selection::add (const TrackViewList& track_list)
TrackViewList added = tracks.add (track_list); TrackViewList added = tracks.add (track_list);
if (!added.empty()) { if (!added.empty()) {
if (!_no_tracks_changed) {
TracksChanged (); TracksChanged ();
} }
}
} }
void void
@ -519,8 +526,10 @@ Selection::remove (TimeAxisView* track)
list<TimeAxisView*>::iterator i; list<TimeAxisView*>::iterator i;
if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) { if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) {
tracks.erase (i); tracks.erase (i);
if (!_no_tracks_changed) {
TracksChanged(); TracksChanged();
} }
}
} }
void void
@ -538,8 +547,10 @@ Selection::remove (const TrackViewList& track_list)
} }
if (changed) { if (changed) {
if (!_no_tracks_changed) {
TracksChanged(); TracksChanged();
} }
}
} }
void void
@ -1232,3 +1243,9 @@ Selection::remove_regions (TimeAxisView* t)
i = tmp; i = tmp;
} }
} }
void
Selection::block_tracks_changed (bool yn)
{
_no_tracks_changed = yn;
}

View file

@ -104,6 +104,8 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
sigc::signal<void> MidiNotesChanged; sigc::signal<void> MidiNotesChanged;
sigc::signal<void> MidiRegionsChanged; sigc::signal<void> MidiRegionsChanged;
void block_tracks_changed (bool);
void clear (); void clear ();
bool empty (bool internal_selection = false); bool empty (bool internal_selection = false);
@ -204,6 +206,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
PublicEditor const * editor; PublicEditor const * editor;
uint32_t next_time_id; uint32_t next_time_id;
bool _no_tracks_changed;
}; };
bool operator==(const Selection& a, const Selection& b); bool operator==(const Selection& a, const Selection& b);

View file

@ -73,6 +73,7 @@ CONFIG_VARIABLE (bool, use_osc, "use-osc", false)
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide) CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false)
CONFIG_VARIABLE (bool, link_editor_and_mixer_selection, "link-editor-and-mixer-selection", false)
CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi") CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi")
CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions", true) CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions", true)
CONFIG_VARIABLE (bool, region_boundaries_from_selected_tracks, "region-boundaries-from-selected-tracks", true) CONFIG_VARIABLE (bool, region_boundaries_from_selected_tracks, "region-boundaries-from-selected-tracks", true)