diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-23 22:31:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-23 22:32:32 +0100 |
commit | 1e4e97019da3e90f89614da51ac537ed2041bb55 (patch) | |
tree | 0f8177b0fa20002f475a614e0d907634dbd71338 /gtk2_ardour/editor_selection.cc | |
parent | 71fd94b422574d1efbcce1ab85c6ce3da22ba450 (diff) |
Lua bindings to access editor selection + region selection bindings
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index d214d48a32..8c6b16f51d 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -893,6 +893,30 @@ out: return commit; } +void +Editor::set_selection (std::list<Selectable*> s, Selection::Operation op) +{ + if (s.empty()) { + return; + } + begin_reversible_selection_op (X_("set selection")); + switch (op) { + case Selection::Toggle: + selection->toggle (s); + break; + case Selection::Set: + selection->set (s); + break; + case Selection::Extend: + selection->add (s); + break; + case Selection::Add: + selection->add (s); + break; + } + + commit_reversible_selection_op () ; +} void Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> region, Selection::Operation op) |