Initialize name_pixbuf and make sure set_name_text doesn't do anything if there is no name_pixbuf.
git-svn-id: svn://localhost/ardour2/branches/3.0@5078 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -171,6 +171,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
||||
show_vestigial = true;
|
||||
visibility = vis;
|
||||
_sensitive = true;
|
||||
name_pixbuf = 0;
|
||||
|
||||
if (duration == 0) {
|
||||
warning << "Time Axis Item Duration == 0" << endl ;
|
||||
@@ -560,6 +561,8 @@ TimeAxisViewItem::set_name_text(const ustring& new_name)
|
||||
uint32_t pb_width, it_width;
|
||||
double font_size;
|
||||
|
||||
if (!name_pixbuf) return;
|
||||
|
||||
font_size = NAME_FONT->get_size() / Pango::SCALE;
|
||||
it_width = trackview.editor().frame_to_pixel(item_duration);
|
||||
pb_width = new_name.length() * font_size;
|
||||
|
||||
Reference in New Issue
Block a user