13
0

Update coverage frame while timming regions #9725

This commit is contained in:
Robin Gareus 2024-06-21 17:36:28 +02:00
parent 24f574772e
commit 44d01f5951
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 13 additions and 13 deletions

View File

@ -2876,10 +2876,13 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
}
}
bool changed = false;
switch (_operation) {
case StartTrim:
for (list<DraggingView>::iterator i = _views.begin (); i != _views.end (); ++i) {
bool changed = i->view->trim_front (timepos_t (i->initial_position) + dt, non_overlap_trim);
changed = i->view->trim_front (timepos_t (i->initial_position) + dt, non_overlap_trim);
if (changed && _preserve_fade_anchor) {
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (i->view);
@ -2900,7 +2903,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
case EndTrim:
for (list<DraggingView>::iterator i = _views.begin (); i != _views.end (); ++i) {
bool changed = i->view->trim_end (timepos_t (i->initial_end) + dt, non_overlap_trim);
changed = i->view->trim_end (timepos_t (i->initial_end) + dt, non_overlap_trim);
if (changed && _preserve_fade_anchor) {
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (i->view);
@ -2918,6 +2921,13 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
break;
}
if (changed) {
for (list<DraggingView>::const_iterator i = _views.begin (); i != _views.end (); ++i) {
StreamView* sv = i->view->get_time_axis_view ().view ();
sv->update_coverage_frame ();
}
}
switch (_operation) {
case StartTrim:
show_verbose_cursor_time (rv->region ()->position ());

View File

@ -963,12 +963,6 @@ RegionView::set_height (double h)
}
}
void
RegionView::drag_start ()
{
clear_coverage_frame ();
}
void
RegionView::clear_coverage_frame ()
{

View File

@ -86,8 +86,6 @@ public:
void raise_to_top ();
void lower_to_bottom ();
void drag_start ();
bool set_position(Temporal::timepos_t const & pos, void* src, double* delta = 0);
virtual void show_region_editor ();

View File

@ -126,6 +126,7 @@ public:
void check_record_layers (std::shared_ptr<ARDOUR::Region>, ARDOUR::samplepos_t);
virtual void playlist_layered (std::weak_ptr<ARDOUR::Track>);
void update_coverage_frame ();
sigc::signal<void, RegionView*> RegionViewAdded;
sigc::signal<void> RegionViewRemoved;
@ -193,9 +194,6 @@ protected:
*/
samplepos_t _new_rec_layer_time;
void setup_new_rec_layer_time (std::shared_ptr<ARDOUR::Region>);
private:
void update_coverage_frame ();
};
#endif /* __ardour_streamview_h__ */