mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Re-show all xfades that we hide during drags (#4933).
git-svn-id: svn://localhost/ardour2/branches/3.0@12729 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e258a15330
commit
a8dd4ec805
5 changed files with 24 additions and 4 deletions
|
|
@ -1794,7 +1794,7 @@ AudioRegionView::drag_start ()
|
|||
AudioStreamView* av = atav->audio_view();
|
||||
if (av) {
|
||||
/* this will hide our xfades too */
|
||||
av->hide_xfades_with (audio_region());
|
||||
_hidden_xfades = av->hide_xfades_with (audio_region());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1803,6 +1803,11 @@ void
|
|||
AudioRegionView::drag_end ()
|
||||
{
|
||||
TimeAxisViewItem::drag_end ();
|
||||
/* fades will be redrawn if they changed */
|
||||
|
||||
for (list<AudioRegionView*>::iterator i = _hidden_xfades.begin(); i != _hidden_xfades.end(); ++i) {
|
||||
(*i)->show_xfades ();
|
||||
}
|
||||
|
||||
_hidden_xfades.clear ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,6 +207,9 @@ private:
|
|||
* may be 0 if no connection exists.
|
||||
*/
|
||||
std::vector<PBD::ScopedConnection*> _data_ready_connections;
|
||||
|
||||
/** RegionViews that we hid the xfades for at the start of the current drag */
|
||||
std::list<AudioRegionView*> _hidden_xfades;
|
||||
};
|
||||
|
||||
#endif /* __gtk_ardour_audio_region_view_h__ */
|
||||
|
|
|
|||
|
|
@ -530,9 +530,14 @@ AudioStreamView::hide_all_fades ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
/** Hide xfades for regions that overlap ar.
|
||||
* @return AudioRegionViews that xfades were hidden for.
|
||||
*/
|
||||
list<AudioRegionView*>
|
||||
AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar)
|
||||
{
|
||||
list<AudioRegionView*> hidden;
|
||||
|
||||
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv) {
|
||||
|
|
@ -541,10 +546,13 @@ AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar)
|
|||
break;
|
||||
default:
|
||||
arv->hide_xfades ();
|
||||
hidden.push_back (arv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hidden;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class AudioStreamView : public StreamView
|
|||
void show_all_fades ();
|
||||
void hide_all_fades ();
|
||||
|
||||
void hide_xfades_with (boost::shared_ptr<ARDOUR::AudioRegion> ar);
|
||||
std::list<AudioRegionView*> hide_xfades_with (boost::shared_ptr<ARDOUR::AudioRegion> ar);
|
||||
|
||||
RegionView* create_region_view (boost::shared_ptr<ARDOUR::Region>, bool, bool);
|
||||
|
||||
|
|
|
|||
|
|
@ -1823,6 +1823,10 @@ TrimDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||
_editor->motion_frozen_playlists.clear ();
|
||||
_editor->commit_reversible_command();
|
||||
|
||||
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
i->view->drag_end ();
|
||||
}
|
||||
|
||||
} else {
|
||||
/* no mouse movement */
|
||||
_editor->point_trim (event, adjusted_current_frame (event));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue