X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftrack.C;h=27cd96b5076e5f7126bee7ad59556909ff4bab98;hb=3643286e2dbb3002604a62e3e6fd834716b4ae63;hp=91bf401afb22a675bd22c2092aec9927a01f2a1e;hpb=04293346a5ef49683cfa6ca3a98ef6cbfcdf7732;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/track.C b/cinelerra-5.1/cinelerra/track.C index 91bf401a..27cd96b5 100644 --- a/cinelerra-5.1/cinelerra/track.C +++ b/cinelerra-5.1/cinelerra/track.C @@ -57,6 +57,7 @@ Track::Track(EDL *edl, Tracks *tracks) : ListItem() this->edl = edl; this->tracks = tracks; y_pixel = 0; + data_h = 64; expand_view = 0; draw = 1; gang = 1; @@ -92,6 +93,7 @@ int Track::copy_settings(Track *track) this->nudge = track->nudge; this->mixer_id = track->mixer_id; this->play = track->play; + this->data_h = track->data_h; this->track_w = track->track_w; this->track_h = track->track_h; this->masks = track->masks; @@ -207,7 +209,7 @@ int Track::vertical_span(Theme *theme) if( show_titles() ) result += theme->get_image("title_bg_data")->get_h(); if( show_assets() ) - result += edl->local_session->zoom_track; + result += data_h; if( expand_view ) result += plugin_set.total * theme->get_image("plugin_bg_data")->get_h(); result = MAX(result, theme->title_h); @@ -321,6 +323,7 @@ int Track::load(FileXML *file, int track_offset, uint32_t load_flags) nudge = file->tag.get_property("NUDGE", nudge); mixer_id = file->tag.get_property("MIXER_ID", mixer_id); expand_view = file->tag.get_property("EXPAND", expand_view); + data_h = file->tag.get_property("DATA_H", data_h); track_w = file->tag.get_property("TRACK_W", track_w); track_h = file->tag.get_property("TRACK_H", track_h); masks = file->tag.get_property("MASKS", masks); @@ -856,12 +859,6 @@ int Track::dump(FILE *fp) return 0; } - -Track::Track() : ListItem() -{ - y_pixel = 0; -} - // ======================================== accounting int Track::number_of() @@ -871,16 +868,6 @@ int Track::number_of() - - - - - - - - - - // ================================================= editing int Track::select_auto(AutoConf *auto_conf, int cursor_x, int cursor_y) @@ -1025,6 +1012,7 @@ int Track::copy(int copy_flags, double start, double end, file->tag.set_property("GANG", gang); file->tag.set_property("DRAW", draw); file->tag.set_property("EXPAND", expand_view); + file->tag.set_property("DATA_H", data_h); file->tag.set_property("TRACK_W", track_w); file->tag.set_property("TRACK_H", track_h); file->tag.set_property("MASKS", masks); @@ -1795,26 +1783,21 @@ int64_t Track::frame_align(int64_t position, int round) return position; } -int Track::plugin_exists(Plugin *plugin) +Plugin *Track::plugin_exists(int plugin_id) { - for(int number = 0; number < plugin_set.size(); number++) - { - PluginSet *ptr = plugin_set.get(number); - for(Plugin *current_plugin = (Plugin*)ptr->first; - current_plugin; - current_plugin = (Plugin*)current_plugin->next) - { - if(current_plugin == plugin) return 1; + for( int i=0; ifirst; + for( ; plugin; plugin=(Plugin*)plugin->next ) { + if( plugin->orig_id == plugin_id ) + return plugin; } } - - for(Edit *current = edits->first; current; current = NEXT) - { - if(current->transition && - (Plugin*)current->transition == plugin) return 1; + for( Edit *current=edits->first; current; current=NEXT ) { + Plugin *plugin = (Plugin *)current->transition; + if( plugin && plugin->orig_id == plugin_id ) + return plugin; } - - return 0; }