mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Use new last_capture_sources API
This commit is contained in:
parent
aafb2c8904
commit
c122af3aa9
2 changed files with 7 additions and 14 deletions
|
|
@ -1021,9 +1021,7 @@ Editor::capture_sources_changed (bool cleared)
|
|||
if (cleared || !_session) {
|
||||
ActionManager::get_action (X_("Editor"), X_("remove-last-capture"))->set_sensitive (false);
|
||||
} else {
|
||||
std::list<std::shared_ptr<ARDOUR::Source> > srcs;
|
||||
_session->get_last_capture_sources (srcs);
|
||||
ActionManager::get_action (X_("Editor"), X_("remove-last-capture"))->set_sensitive (!srcs.empty ());
|
||||
ActionManager::get_action (X_("Editor"), X_("remove-last-capture"))->set_sensitive (_session->have_last_capture_sources ());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5471,17 +5471,12 @@ Editor::tag_last_capture ()
|
|||
std::list<std::shared_ptr<Region> > rlist;
|
||||
|
||||
std::list<std::shared_ptr<Source> > srcs;
|
||||
_session->get_last_capture_sources (srcs);
|
||||
for (std::list<std::shared_ptr<Source> >::iterator i = srcs.begin(); i != srcs.end(); ++i) {
|
||||
std::shared_ptr<ARDOUR::Source> source = (*i);
|
||||
if (source) {
|
||||
|
||||
set<std::shared_ptr<Region> > regions;
|
||||
RegionFactory::get_regions_using_source (source, regions);
|
||||
for (set<std::shared_ptr<Region> >::iterator r = regions.begin(); r != regions.end(); r++) {
|
||||
rlist.push_back(*r);
|
||||
}
|
||||
|
||||
_session->last_capture_sources (srcs);
|
||||
for (auto const& source : srcs) {
|
||||
set<std::shared_ptr<Region>> regions;
|
||||
RegionFactory::get_regions_using_source (source, regions);
|
||||
for (auto const& r: regions) {
|
||||
rlist.push_back (r);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue