Playlist::set_state().
git-svn-id: svn://localhost/trunk/ardour2@401
d708f5d6-7413-0410-9779-
e7cbd77b26cf
AudioRegion *out = dynamic_cast<AudioRegion*>( (*out_n) );
Crossfade *new_fade = new Crossfade( *(*xfades), in, out);
add_crossfade(*new_fade);
AudioRegion *out = dynamic_cast<AudioRegion*>( (*out_n) );
Crossfade *new_fade = new Crossfade( *(*xfades), in, out);
add_crossfade(*new_fade);
- cerr << "Here we go!" << endl;
- _edit_mode = other._edit_mode;
- _splicing = other._splicing;
- _nudging = other._nudging;
+ RegionList tmp;
+ other.copy_regions (tmp);
- other.copy_regions (regions);
- for (list<Region*>::iterator x = regions.begin(); x != regions.end(); ++x) {
- (*x)->set_playlist (this);
+ for (list<Region*>::iterator x = tmp.begin(); x != tmp.end(); ++x) {
+ add_region_internal( (*x), (*x)->position() );
+
+ in_set_state = false;
+
+ _splicing = other._splicing;
+ _nudging = other._nudging;
+ _edit_mode = other._edit_mode;
+
+ in_set_state = false;
+ in_flush = false;
+ in_partition = false;
+ subcnt = 0;
+ _read_data_count = 0;
+ _frozen = other._frozen;
+ save_on_thaw = false;
+
+ layer_op_counter = other.layer_op_counter;
+ freeze_length = other.freeze_length;
+
}
Playlist::Playlist (const Playlist& other, jack_nframes_t start, jack_nframes_t cnt, string str, bool hide)
}
Playlist::Playlist (const Playlist& other, jack_nframes_t start, jack_nframes_t cnt, string str, bool hide)
}
if (n || pending_modified) {
}
if (n || pending_modified) {
- possibly_splice ();
- relayer ();
+ if (!in_set_state) {
+ possibly_splice ();
+ relayer ();
+ }
pending_modified = false;
Modified (); /* EMIT SIGNAL */
}
pending_modified = false;
Modified (); /* EMIT SIGNAL */
}
add_region (*region, region->position(), 1.0, false);
add_region (*region, region->position(), 1.0, false);
+ // So that layer_op ordering doesn't get screwed up
+ region->set_last_layer_op( region->layer());
+
/* update dependents, which was not done during add_region_internal
due to in_set_state being true
*/
/* update dependents, which was not done during add_region_internal
due to in_set_state being true
*/
for (RegionList::iterator r = regions.begin(); r != regions.end(); ++r) {
check_dependents (**r, false);
}
for (RegionList::iterator r = regions.begin(); r != regions.end(); ++r) {
check_dependents (**r, false);
}
in_set_state = false;
return 0;
in_set_state = false;
return 0;