mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
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:
parent
db7a8cbcc2
commit
7d2e28bba0
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue