mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Remove "Fill Range with Region" from menu and also its function.
This commit is contained in:
parent
990fd75c5f
commit
00c68ae2e6
2 changed files with 0 additions and 62 deletions
|
|
@ -1894,7 +1894,6 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
||||||
|
|
||||||
edit_items.push_back (SeparatorElem());
|
edit_items.push_back (SeparatorElem());
|
||||||
edit_items.push_back (MenuElem (_("Crop Region to Range"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)));
|
edit_items.push_back (MenuElem (_("Crop Region to Range"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)));
|
||||||
edit_items.push_back (MenuElem (_("Fill Range with Region"), sigc::mem_fun(*this, &Editor::region_fill_selection)));
|
|
||||||
edit_items.push_back (MenuElem (_("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false)));
|
edit_items.push_back (MenuElem (_("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false)));
|
||||||
|
|
||||||
edit_items.push_back (SeparatorElem());
|
edit_items.push_back (SeparatorElem());
|
||||||
|
|
|
||||||
|
|
@ -3353,67 +3353,6 @@ Editor::region_fill_track ()
|
||||||
commit_reversible_command ();
|
commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Editor::region_fill_selection ()
|
|
||||||
{
|
|
||||||
if (clicked_routeview == 0 || !clicked_routeview->is_audio_track()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selection->time.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boost::shared_ptr<Region> region = _regions->get_single_selection ();
|
|
||||||
if (region == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
framepos_t start = selection->time[clicked_selection].start;
|
|
||||||
framepos_t end = selection->time[clicked_selection].end;
|
|
||||||
|
|
||||||
boost::shared_ptr<Playlist> playlist;
|
|
||||||
|
|
||||||
if (selection->tracks.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
framepos_t selection_length = end - start;
|
|
||||||
float times = (float)selection_length / region->length();
|
|
||||||
bool in_command = false;
|
|
||||||
|
|
||||||
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
|
|
||||||
RegionSelection foo;
|
|
||||||
|
|
||||||
for (TrackViewList::iterator i = ts.begin(); i != ts.end(); ++i) {
|
|
||||||
|
|
||||||
if ((playlist = (*i)->playlist()) == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!in_command) {
|
|
||||||
begin_reversible_command (Operations::fill_selection);
|
|
||||||
in_command = true;
|
|
||||||
}
|
|
||||||
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
|
|
||||||
latest_regionviews.clear ();
|
|
||||||
sigc::connection c = rtv->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view));
|
|
||||||
|
|
||||||
playlist->clear_changes ();
|
|
||||||
playlist->add_region (RegionFactory::create (region, true), start, times);
|
|
||||||
_session->add_command (new StatefulDiffCommand (playlist));
|
|
||||||
c.disconnect ();
|
|
||||||
foo.insert (foo.end(), latest_regionviews.begin(), latest_regionviews.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_command) {
|
|
||||||
if (!foo.empty()) {
|
|
||||||
selection->set (foo);
|
|
||||||
}
|
|
||||||
commit_reversible_command ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_region_sync_position ()
|
Editor::set_region_sync_position ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue