mark the step entry dialog as a dialog even though it is an ArdourWindow, to help...
[ardour.git] / gtk2_ardour / time_axis_view_item.cc
index 399672d9a63a4f0ee9a7f7965383fd3f229d9514..2b20b3c45e6db337c401003aafa25fbb87ebb7bd 100644 (file)
@@ -103,6 +103,7 @@ TimeAxisViewItem::TimeAxisViewItem(
        , _height (1.0)
        , _recregion (recording)
        , _automation (automation)
+       , _dragging (false)
 {
        group = new ArdourCanvas::Group (parent);
 
@@ -116,6 +117,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
        , trackview (other.trackview)
        , _recregion (other._recregion)
        , _automation (other._automation)
+       , _dragging (other._dragging)
 {
 
        Gdk::Color c;
@@ -132,10 +134,8 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
 
        _selected = other._selected;
 
-       init (
-               other.item_name, other.samples_per_unit, c, other.frame_position,
-               other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name
-               );
+       init (other.item_name, other.samples_per_unit, c, other.frame_position,
+             other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name);
 }
 
 void
@@ -328,7 +328,9 @@ bool
 TimeAxisViewItem::set_duration (framecnt_t dur, void* src)
 {
        if ((dur > max_item_duration) || (dur < min_item_duration)) {
-               warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
+               warning << string_compose (
+                               P_("new duration %1 frame is out of bounds for %2", "new duration of %1 frames is out of bounds for %2", dur),
+                               get_item_name(), dur)
                        << endmsg;
                return false;
        }
@@ -916,9 +918,12 @@ TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
        }
 
        update_name_pixbuf_visibility ();
-       if (pb_width > 0) {
-               name_pixbuf->property_pixbuf() = pixbuf_from_string(item_name, NAME_FONT, pb_width, NAME_HEIGHT, Gdk::Color ("#000000"));
+
+       if (pb_width < 1) {
+               pb_width = 1;
        }
+
+       name_pixbuf->property_pixbuf() = pixbuf_from_string(item_name, NAME_FONT, pb_width, NAME_HEIGHT, Gdk::Color ("#000000"));
 }
 
 /**