#include "ardour_ui.h"
#include "automation_time_axis.h"
#include "automation_streamview.h"
+#include "gui_thread.h"
#include "route_time_axis.h"
#include "automation_line.h"
#include "public_editor.h"
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 */
}
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 */
+ }
}
}
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());
- automation_connection = _control->alist()->automation_state_changed.connect
- (boost::bind (&AutomationTimeAxisView::automation_state_changed, this));
+ _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;
+}