mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Remove some redundant calls to snap_to(). get_preferred_edit_position() already did it.
This commit is contained in:
parent
5d423e38d5
commit
fcabb27561
5 changed files with 6 additions and 38 deletions
|
|
@ -542,7 +542,7 @@ public:
|
||||||
|
|
||||||
/* editing operations that need to be public */
|
/* editing operations that need to be public */
|
||||||
void mouse_add_new_marker (samplepos_t where, bool is_cd=false);
|
void mouse_add_new_marker (samplepos_t where, bool is_cd=false);
|
||||||
void split_regions_at (ARDOUR::MusicSample, RegionSelection&, bool snap = true);
|
void split_regions_at (ARDOUR::MusicSample, RegionSelection&);
|
||||||
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
|
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
|
||||||
RegionSelection get_regions_from_selection_and_mouse (samplepos_t);
|
RegionSelection get_regions_from_selection_and_mouse (samplepos_t);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6994,7 +6994,7 @@ RegionCutDrag::finished (GdkEvent* event, bool)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_editor->split_regions_at (pos, rs, false);
|
_editor->split_regions_at (pos, rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,6 @@ Editor::keyboard_selection_finish (bool /*add*/, Editing::EditIgnoreOption ign)
|
||||||
end = get_preferred_edit_position(ign);
|
end = get_preferred_edit_position(ign);
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to (start);
|
|
||||||
|
|
||||||
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
|
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
|
||||||
if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
|
if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
|
||||||
select_all_tracks();
|
select_all_tracks();
|
||||||
|
|
@ -80,9 +77,6 @@ Editor::keyboard_selection_begin (Editing::EditIgnoreOption ign)
|
||||||
start.sample = get_preferred_edit_position(ign);
|
start.sample = get_preferred_edit_position(ign);
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to(start);
|
|
||||||
|
|
||||||
//if there's not already a sensible selection endpoint, go "forever"
|
//if there's not already a sensible selection endpoint, go "forever"
|
||||||
if (start.sample > end.sample) {
|
if (start.sample > end.sample) {
|
||||||
#ifdef MIXBUS
|
#ifdef MIXBUS
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ Editor::redo (uint32_t n)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::split_regions_at (MusicSample where, RegionSelection& regions, bool snap_sample)
|
Editor::split_regions_at (MusicSample where, RegionSelection& regions)
|
||||||
{
|
{
|
||||||
bool frozen = false;
|
bool frozen = false;
|
||||||
|
|
||||||
|
|
@ -189,25 +189,11 @@ Editor::split_regions_at (MusicSample where, RegionSelection& regions, bool snap
|
||||||
|
|
||||||
begin_reversible_command (_("split"));
|
begin_reversible_command (_("split"));
|
||||||
|
|
||||||
// if splitting a single region, and snap-to is using
|
|
||||||
// region boundaries, don't pay attention to them
|
|
||||||
|
|
||||||
if (regions.size() == 1) {
|
if (regions.size() == 1) {
|
||||||
// switch (_snap_type) { //ToDo !!!
|
/* TODO: if splitting a single region, and snap-to is using
|
||||||
// case SnapToRegionStart:
|
region boundaries, mabye we shouldn't pay attention to them? */
|
||||||
// case SnapToRegionSync:
|
|
||||||
// case SnapToRegionEnd:
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// if (snap_sample) {
|
|
||||||
snap_to (where);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
if (snap_sample) {
|
|
||||||
snap_to (where);
|
|
||||||
}
|
|
||||||
|
|
||||||
frozen = true;
|
frozen = true;
|
||||||
EditorFreeze(); /* Emit Signal */
|
EditorFreeze(); /* Emit Signal */
|
||||||
}
|
}
|
||||||
|
|
@ -6618,9 +6604,6 @@ Editor::set_punch_start_from_edit_point ()
|
||||||
start.sample = get_preferred_edit_position();
|
start.sample = get_preferred_edit_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to(start);
|
|
||||||
|
|
||||||
//if there's not already a sensible selection endpoint, go "forever"
|
//if there's not already a sensible selection endpoint, go "forever"
|
||||||
if (start.sample > end) {
|
if (start.sample > end) {
|
||||||
end = max_samplepos;
|
end = max_samplepos;
|
||||||
|
|
@ -6651,9 +6634,6 @@ Editor::set_punch_end_from_edit_point ()
|
||||||
end.sample = get_preferred_edit_position();
|
end.sample = get_preferred_edit_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to (end);
|
|
||||||
|
|
||||||
set_punch_range (start, end.sample, _("set punch end from EP"));
|
set_punch_range (start, end.sample, _("set punch end from EP"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -6679,9 +6659,6 @@ Editor::set_loop_start_from_edit_point ()
|
||||||
start.sample = get_preferred_edit_position();
|
start.sample = get_preferred_edit_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to (start);
|
|
||||||
|
|
||||||
//if there's not already a sensible selection endpoint, go "forever"
|
//if there's not already a sensible selection endpoint, go "forever"
|
||||||
if (start.sample > end) {
|
if (start.sample > end) {
|
||||||
end = max_samplepos;
|
end = max_samplepos;
|
||||||
|
|
@ -6712,9 +6689,6 @@ Editor::set_loop_end_from_edit_point ()
|
||||||
end.sample = get_preferred_edit_position();
|
end.sample = get_preferred_edit_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
//snap the selection start/end
|
|
||||||
snap_to(end);
|
|
||||||
|
|
||||||
set_loop_range (start, end.sample, _("set loop end from EP"));
|
set_loop_range (start, end.sample, _("set loop end from EP"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ public:
|
||||||
virtual void restore_editing_space () = 0;
|
virtual void restore_editing_space () = 0;
|
||||||
virtual samplepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
|
virtual samplepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
|
||||||
virtual void toggle_meter_updating() = 0;
|
virtual void toggle_meter_updating() = 0;
|
||||||
virtual void split_regions_at (ARDOUR::MusicSample, RegionSelection&, bool snap) = 0;
|
virtual void split_regions_at (ARDOUR::MusicSample, RegionSelection&) = 0;
|
||||||
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
||||||
virtual void mouse_add_new_marker (samplepos_t where, bool is_cd=false) = 0;
|
virtual void mouse_add_new_marker (samplepos_t where, bool is_cd=false) = 0;
|
||||||
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue