summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view_item.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-03 00:14:24 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-03 00:14:24 +0000
commit3538c47d255d56e335d731bca5c738a0f79956a1 (patch)
treea0227a73b2a843f5f39e673ea132b088d498cf06 /gtk2_ardour/time_axis_view_item.cc
parent9dddffcc8ff4e7747c86844194f4041f8733a189 (diff)
Fix #2947.
git-svn-id: svn://localhost/ardour2/branches/3.0@6266 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r--gtk2_ardour/time_axis_view_item.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 32c7402017..53f8b39ce0 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -107,7 +107,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
group = new ArdourCanvas::Group (parent);
- init (it_name, spu, base_color, start, duration, vis);
+ init (it_name, spu, base_color, start, duration, vis, true);
}
@@ -128,11 +128,11 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
group = new ArdourCanvas::Group (*parent);
- init (other.item_name, other.samples_per_unit, c, other.frame_position, other.item_duration, other.visibility);
+ init (other.item_name, other.samples_per_unit, c, other.frame_position, other.item_duration, other.visibility, other.wide_enough_for_name);
}
void
-TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis)
+TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool wide)
{
item_name = it_name ;
samples_per_unit = spu ;
@@ -149,6 +149,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & ba
_sensitive = true;
name_pixbuf_width = 0;
last_item_width = 0;
+ wide_enough_for_name = wide;
if (duration == 0) {
warning << "Time Axis Item Duration == 0" << endl ;
@@ -554,7 +555,9 @@ TimeAxisViewItem::set_height (double height)
} else {
name_highlight->show();
- name_pixbuf->show();
+ if (wide_enough_for_name) {
+ name_pixbuf->show();
+ }
}
@@ -896,9 +899,11 @@ TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
}
if (pb_width <= 0 || it_width <= NAME_X_OFFSET) {
+ wide_enough_for_name = false;
name_pixbuf->hide();
return;
} else {
+ wide_enough_for_name = true;
name_pixbuf->show();
}