diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-14 21:46:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-14 21:46:32 +0000 |
commit | 00cba5aa3b4691e44502187f1c9f491c3392d61f (patch) | |
tree | a6e76d6fa1768e6598cc0040d15fbfd2994bf9e4 /gtk2_ardour/route_time_axis.cc | |
parent | 2bc6b777c66d80e544300963c920caa912e9695b (diff) |
more substantive reworkings of TimeAxisView::name_(entry|label) and name editing. better, but i can still (somehow) trigger occasional misbehaviour
git-svn-id: svn://localhost/ardour2/branches/3.0@13840 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 5d091375b4..4f2164f3aa 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -111,6 +111,8 @@ void RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt) { RouteUI::set_route (rt); + + show_name_label (); gm.set_controls (_route, _route->shared_peak_meter(), _route->amp()); gm.get_level_meter().set_no_show_all(); @@ -321,15 +323,15 @@ RouteTimeAxisView::label_view () { string x = _route->name(); - if (x != name_entry.get_text()) { - name_entry.set_text (x); + if (name_entry && x != name_entry->get_text()) { + name_entry->set_text (x); + ARDOUR_UI::instance()->set_tip (*name_entry, Glib::Markup::escape_text(x)); } if (x != name_label.get_text()) { name_label.set_text (x); } - ARDOUR_UI::instance()->set_tip (name_entry, Glib::Markup::escape_text(x)); } void @@ -1288,7 +1290,7 @@ RouteTimeAxisView::name_entry_changed () { TimeAxisView::name_entry_changed (); - string x = name_entry.get_text (); + string x = name_entry->get_text (); if (x == _route->name()) { return; @@ -1297,18 +1299,18 @@ RouteTimeAxisView::name_entry_changed () strip_whitespace_edges (x); if (x.length() == 0) { - name_entry.set_text (_route->name()); + name_entry->set_text (_route->name()); return; } if (_session->route_name_internal (x)) { ARDOUR_UI::instance()->popup_error (string_compose (_("You cannot create a track with that name as it is reserved for %1"), PROGRAM_NAME)); - name_entry.grab_focus (); + name_entry->grab_focus (); } else if (RouteUI::verify_new_route_name (x)) { _route->set_name (x); } else { - name_entry.grab_focus (); + name_entry->grab_focus (); } } |