rework histogram_bezier, init wm icon set_icon(gg), update de.po+msg/txt
[goodguy/history.git] / cinelerra-5.1 / cinelerra / track.C
index b13e9e9d1acbc1a0859b4bf188df9ffa4b80f33d..bac9abd68050bed5c1f8908fa9e92e239f8e4b7d 100644 (file)
@@ -218,16 +218,13 @@ printf("Track::operator= 1\n");
 int Track::vertical_span(Theme *theme)
 {
        int result = 0;
-       if(expand_view)
-               result = edl->local_session->zoom_track +
-                       plugin_set.total *
-                       theme->get_image("plugin_bg_data")->get_h();
-       else
-               result = edl->local_session->zoom_track;
-
-       if(edl->session->show_titles)
+       if( show_titles() )
                result += theme->get_image("title_bg_data")->get_h();
-
+       if( show_assets() )
+               result += edl->local_session->zoom_track;
+       if( expand_view )
+               result += plugin_set.total * theme->get_image("plugin_bg_data")->get_h();
+       result = MAX(result, theme->title_h);
        return result;
 }
 
@@ -284,7 +281,20 @@ int Track::has_speed()
        return 0;
 }
 
+int Track::show_assets()
+{
+       return expand_view || edl->session->show_assets ? 1 : 0;
+}
+
+int Track::show_titles()
+{
+       return expand_view || edl->session->show_titles ? 1 : 0;
+}
 
+int Track::show_transitions()
+{
+       return expand_view || edl->session->auto_conf->transitions ? 1 : 0;
+}
 
 void Track::get_source_dimensions(double position, int &w, int &h)
 {
@@ -342,7 +352,10 @@ int Track::load(FileXML *file, int track_offset, uint32_t load_flags)
                        else
                        if(file->tag.title_is("TITLE"))
                        {
-                               file->read_text_until("/TITLE", title, BCTEXTLEN);
+                               XMLBuffer data;
+                               file->read_text_until("/TITLE", &data);
+                               memset(title, 0, sizeof(title));
+                               strncpy(title, data.cstr(), sizeof(title)-1);
                        }
                        else
                        if(load_flags && automation->load(file)