crop_region_to_selection: remove redundant check for a Range
get_edit_op_range() already checks for the existence of a Range
This commit is contained in:
parent
256549e0c7
commit
62fd8ecd35
|
@ -3452,27 +3452,16 @@ Editor::separate_under_selected_regions ()
|
||||||
void
|
void
|
||||||
Editor::crop_region_to_selection ()
|
Editor::crop_region_to_selection ()
|
||||||
{
|
{
|
||||||
if (!selection->time.empty()) {
|
timepos_t start;
|
||||||
|
timepos_t end;
|
||||||
|
|
||||||
|
if (get_edit_op_range (start, end)) {
|
||||||
|
begin_reversible_command (_("Crop Regions to Edit Range"));
|
||||||
|
|
||||||
|
crop_region_to (start, end);
|
||||||
|
|
||||||
begin_reversible_command (_("Crop Regions to Time Selection"));
|
|
||||||
for (std::list<TimelineRange>::iterator i = selection->time.begin(); i != selection->time.end(); ++i) {
|
|
||||||
crop_region_to ((*i).start(), (*i).end());
|
|
||||||
}
|
|
||||||
commit_reversible_command();
|
commit_reversible_command();
|
||||||
} else {
|
|
||||||
|
|
||||||
timepos_t start;
|
|
||||||
timepos_t end;
|
|
||||||
|
|
||||||
if (get_edit_op_range (start, end)) {
|
|
||||||
begin_reversible_command (_("Crop Regions to Edit Range"));
|
|
||||||
|
|
||||||
crop_region_to (start, end);
|
|
||||||
|
|
||||||
commit_reversible_command();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue