controls_table.set_no_show_all();
- ARDOUR_UI::instance()->tooltips().set_tip(auto_button, _("automation state"));
- ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("hide track"));
+ ARDOUR_UI::instance()->set_tip(auto_button, _("automation state"));
+ ARDOUR_UI::instance()->set_tip(hide_button, _("hide track"));
/* rearrange the name display */
tipname += ": ";
}
tipname += _name;
- ARDOUR_UI::instance()->tooltips().set_tip(controls_ebox, tipname);
+ ARDOUR_UI::instance()->set_tip(controls_ebox, tipname);
}
/* add the buttons */
void
AutomationTimeAxisView::set_height (uint32_t h)
{
- bool changed = (height != (uint32_t) h) || first_call_to_set_height;
- bool changed_between_small_and_normal = (
- (height < hNormal && h >= hNormal)
- || (height >= hNormal || h < hNormal) );
+ bool const changed = (height != (uint32_t) h) || first_call_to_set_height;
+ uint32_t const normal = preset_height (HeightNormal);
+ bool const changed_between_small_and_normal = ( (height < normal && h >= normal) || (height >= normal || h < normal) );
TimeAxisView* state_parent = get_parent_with_state ();
assert(state_parent);
first_call_to_set_height = false;
- if (h >= hNormal) {
+ if (h >= preset_height (HeightNormal)) {
controls_table.remove (name_hbox);
if (plugname) {
auto_button.show();
hide_button.show_all();
- } else if (h >= hSmall) {
+ } else if (h >= preset_height (HeightSmall)) {
controls_table.remove (name_hbox);
if (plugname) {
if (plugname_packed) {
auto_button.hide();
hide_button.hide();
}
- } else if (h >= hNormal){
+ } else if (h >= preset_height (HeightNormal)) {
cerr << "track grown, but neither changed_between_small_and_normal nor first_call_to_set_height set!" << endl;
}
if (changed) {
- /* only emit the signal if the height really changed */
- _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
+ if (canvas_item_visible (_canvas_display)) {
+ /* only emit the signal if the height really changed and we were visible */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
+ }
}
}
{
using namespace Menu_Helpers;
- /* get the size menu ready */
-
- build_size_menu ();
-
/* prepare it */
TimeAxisView::build_display_menu ();
MenuList& items = display_menu->items();
- items.push_back (MenuElem (_("Height"), *size_menu));
- items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Hide"), sigc::mem_fun(*this, &AutomationTimeAxisView::hide_clicked)));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Clear"), sigc::mem_fun(*this, &AutomationTimeAxisView::clear_clicked)));
void
AutomationTimeAxisView::set_selected_points (PointSelection& points)
{
- if (_line)
+ if (_line) {
_line->set_selected_points (points);
+ }
}
void
assert(!_line);
assert(line->the_list() == _control->list());
- _control->alist()->automation_state_changed.connect (automation_connection, boost::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context());
+ _control->alist()->automation_state_changed.connect (automation_connection, invalidator (*this), boost::bind (&AutomationTimeAxisView::automation_state_changed, this), gui_context());
_line = line;
//_controller = AutomationController::create(_session, line->the_list(), _control);
TimeAxisView::hide ();
}
+bool
+AutomationTimeAxisView::set_visibility (bool yn)
+{
+ bool changed = TimeAxisView::set_visibility (yn);
+
+ if (changed) {
+ get_state_node()->add_property ("shown", yn ? X_("yes") : X_("no"));
+ }
+
+ return changed;
+}