13
0

Hide coverage frame when dragging layered region #9725

This commit is contained in:
Robin Gareus 2024-06-21 01:52:12 +02:00
parent 0e3ed8dbaf
commit 24f574772e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 23 additions and 7 deletions

View File

@ -1914,7 +1914,7 @@ AudioRegionView::show_xfades ()
void
AudioRegionView::drag_start ()
{
TimeAxisViewItem::drag_start ();
RegionView::drag_start ();
//we used to hide xfades here. I don't see the point with the new model, but we can re-implement if needed
}

View File

@ -2795,11 +2795,12 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
rv->trim_front_starting ();
}
rv->drag_start ();
AudioRegionView* const arv = dynamic_cast<AudioRegionView*> (rv);
if (arv) {
arv->temporarily_hide_envelope ();
arv->drag_start ();
}
std::shared_ptr<Playlist> pl = rv->region ()->playlist ();

View File

@ -963,17 +963,28 @@ RegionView::set_height (double h)
}
}
void
RegionView::drag_start ()
{
clear_coverage_frame ();
}
void
RegionView::clear_coverage_frame ()
{
for (auto& i : _coverage_frame) {
delete i;
}
_coverage_frame.clear ();
}
/** Remove old coverage frame and make new ones, if we're in a LayerDisplay mode
* which uses them. */
void
RegionView::update_coverage_frame (LayerDisplay d)
{
/* remove old coverage frame */
for (auto& i : _coverage_frame) {
delete i;
}
_coverage_frame.clear ();
clear_coverage_frame ();
if (d != Stacked) {
/* don't do coverage frame unless we're in stacked mode */

View File

@ -86,6 +86,8 @@ 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 ();
@ -238,6 +240,8 @@ private:
void update_cue_markers ();
void clear_coverage_frame ();
struct ViewCueMarker {
ArdourMarker* view_marker;
ARDOUR::CueMarker model_marker;