mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
fixed various xfade and undo and updating issues. plugins no longer run on deactivated routes/tracks. other region copy/trim undo fixes
git-svn-id: svn://localhost/trunk/ardour2@279 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6ef5c8da56
commit
5eb4a701f3
6 changed files with 48 additions and 12 deletions
|
|
@ -2533,6 +2533,9 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
vector<AudioRegionView*> new_regionviews;
|
||||
|
||||
set<Playlist*> affected_playlists;
|
||||
pair<set<Playlist*>::iterator,bool> insert_result;
|
||||
|
||||
for (list<AudioRegionView*>::const_iterator i = selection->audio_regions.by_layer().begin(); i != selection->audio_regions.by_layer().end(); ++i) {
|
||||
AudioRegionView* rv;
|
||||
|
||||
|
|
@ -2540,8 +2543,12 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
Playlist* to_playlist = rv->region.playlist();
|
||||
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*>(&rv->get_time_axis_view());
|
||||
|
||||
insert_result = affected_playlists.insert (to_playlist);
|
||||
if (insert_result.second) {
|
||||
session->add_undo (to_playlist->get_memento ());
|
||||
}
|
||||
|
||||
session->add_undo (to_playlist->get_memento ());
|
||||
latest_regionview = 0;
|
||||
|
||||
sigc::connection c = atv->view->AudioRegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
|
||||
|
|
@ -2597,7 +2604,7 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
show_verbose_time_cursor (drag_info.last_frame_position, 10);
|
||||
|
||||
begin_reversible_command (_("copy region(s)"));
|
||||
//begin_reversible_command (_("copy region(s)"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3213,7 +3220,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
} else {
|
||||
|
||||
/* motion within a single track */
|
||||
|
||||
|
||||
for (list<AudioRegionView*>::const_iterator i = selection->audio_regions.by_layer().begin(); i != selection->audio_regions.by_layer().end(); ++i) {
|
||||
|
||||
rv = (*i);
|
||||
|
|
@ -3713,6 +3720,8 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
jack_nframes_t region_start = (jack_nframes_t) (clicked_regionview->region.position() / speed);
|
||||
jack_nframes_t region_end = (jack_nframes_t) (clicked_regionview->region.last_frame() / speed);
|
||||
jack_nframes_t region_length = (jack_nframes_t) (clicked_regionview->region.length() / speed);
|
||||
|
||||
motion_frozen_playlists.clear();
|
||||
|
||||
//drag_info.item = clicked_regionview->get_name_highlight();
|
||||
drag_info.item = item;
|
||||
|
|
@ -3763,6 +3772,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
AudioTimeAxisView* tv = dynamic_cast<AudioTimeAxisView*>(tvp);
|
||||
pair<set<Playlist*>::iterator,bool> insert_result;
|
||||
|
||||
if (tv && tv->is_audio_track()) {
|
||||
speed = tv->get_diskstream()->speed();
|
||||
|
|
@ -3803,7 +3813,12 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
for (list<AudioRegionView*>::const_iterator i = selection->audio_regions.by_layer().begin(); i != selection->audio_regions.by_layer().end(); ++i) {
|
||||
(*i)->region.freeze ();
|
||||
(*i)->temporarily_hide_envelope ();
|
||||
session->add_undo ((*i)->region.playlist()->get_memento());
|
||||
|
||||
Playlist * pl = (*i)->region.playlist();
|
||||
insert_result = motion_frozen_playlists.insert (pl);
|
||||
if (insert_result.second) {
|
||||
session->add_undo (pl->get_memento());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3989,6 +4004,14 @@ Editor::trim_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
thaw_region_after_trim (**i);
|
||||
}
|
||||
}
|
||||
|
||||
for (set<Playlist*>::iterator p = motion_frozen_playlists.begin(); p != motion_frozen_playlists.end(); ++p) {
|
||||
//(*p)->thaw ();
|
||||
session->add_redo_no_execute ((*p)->get_memento());
|
||||
}
|
||||
|
||||
motion_frozen_playlists.clear ();
|
||||
|
||||
commit_reversible_command();
|
||||
} else {
|
||||
/* no mouse movement */
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ StreamView::remove_rec_region (Region *r)
|
|||
void
|
||||
StreamView::undisplay_diskstream ()
|
||||
{
|
||||
|
||||
for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
delete *i;
|
||||
}
|
||||
|
|
@ -446,6 +447,7 @@ StreamView::redisplay_diskstream ()
|
|||
list<AudioRegionView *>::iterator i, tmp;
|
||||
list<CrossfadeView*>::iterator xi, tmpx;
|
||||
|
||||
|
||||
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
(*i)->set_valid (false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class Crossfade : public Stateful, public StateManager
|
|||
static Sample* crossfade_buffer_out;
|
||||
static Sample* crossfade_buffer_in;
|
||||
|
||||
void initialize ();
|
||||
void initialize (bool savestate=true);
|
||||
int compute (ARDOUR::AudioRegion&, ARDOUR::AudioRegion&, CrossfadeModel);
|
||||
bool update (bool force);
|
||||
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ AudioPlaylist::destroy_region (Region* region)
|
|||
void
|
||||
AudioPlaylist::crossfade_changed (Change ignored)
|
||||
{
|
||||
if (in_flush) {
|
||||
if (in_flush || in_set_state) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -798,6 +798,7 @@ AudioPlaylist::crossfade_changed (Change ignored)
|
|||
*/
|
||||
|
||||
maybe_save_state (_("xfade change"));
|
||||
|
||||
notify_modified ();
|
||||
}
|
||||
|
||||
|
|
@ -847,7 +848,7 @@ AudioPlaylist::region_changed (Change what_changed, Region* region)
|
|||
|
||||
maybe_save_state (_("region modified"));
|
||||
|
||||
if (parent_wants_notify || (what_changed & our_interests)) {
|
||||
if ((parent_wants_notify || (what_changed & our_interests))) {
|
||||
notify_modified ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,17 +146,19 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
|
|||
<< endmsg;
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
|
||||
if ((_out = dynamic_cast<AudioRegion*> (r)) == 0) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
_length = 0;
|
||||
initialize();
|
||||
initialize(false);
|
||||
|
||||
if (set_state (node)) {
|
||||
throw failed_constructor();
|
||||
}
|
||||
|
||||
save_state ("initial");
|
||||
}
|
||||
|
||||
Crossfade::~Crossfade ()
|
||||
|
|
@ -167,7 +169,7 @@ Crossfade::~Crossfade ()
|
|||
}
|
||||
|
||||
void
|
||||
Crossfade::initialize ()
|
||||
Crossfade::initialize (bool savestate)
|
||||
{
|
||||
_in_update = false;
|
||||
|
||||
|
|
@ -198,8 +200,10 @@ Crossfade::initialize ()
|
|||
// _out->StateChanged.connect (slot (*this, &Crossfade::member_changed));
|
||||
|
||||
overlap_type = _in->coverage (_out->position(), _out->last_frame());
|
||||
|
||||
save_state ("initial");
|
||||
|
||||
if (savestate) {
|
||||
save_state ("initial");
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -1756,6 +1756,12 @@ Route::silence (jack_nframes_t nframes, jack_nframes_t offset)
|
|||
|
||||
if (lm.locked()) {
|
||||
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||
PluginInsert* pi;
|
||||
if (!_active && (pi = dynamic_cast<PluginInsert*> (*i)) != 0) {
|
||||
// skip plugins, they don't need anything when we're not active
|
||||
continue;
|
||||
}
|
||||
|
||||
(*i)->silence (nframes, offset);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue