along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <ardour/curve.h>
}
void
-PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
if (lines.empty()) {
/* no data, possibly caused by no outputs/inputs */
XMLNode &before = alist.get_state();
alist.add (when, y);
XMLNode &after = alist.get_state();
- _session.add_command(new MementoCommand<AutomationList>(alist, before, after));
+ _session.add_command(new MementoCommand<AutomationList>(alist, &before, &after));
_session.commit_reversible_command ();
_session.set_dirty ();
}
multiline_selector.set_active(0);
}
- if (lines.size() + 1 > 1 && (height_style != Small && height_style != Smaller)) {
+ if (lines.size() + 1 > 1 && (height > hSmall)) {
multiline_selector.show();
} else {
multiline_selector.hide();
}
void
-PanAutomationTimeAxisView::set_height (TimeAxisView::TrackHeight th)
+PanAutomationTimeAxisView::set_height (uint32_t h)
{
- AutomationTimeAxisView::set_height(th);
-
- switch (th) {
- case Largest:
- case Large:
- case Larger:
- case Normal:
- if (lines.size() > 1) {
- multiline_selector.show();
- break;
- }
- default:
- multiline_selector.hide();
+ AutomationTimeAxisView::set_height(h);
+
+ if (h >= hNormal) {
+ if (lines.size() > 1) {
+ multiline_selector.show();
+ }
+ } else {
+ multiline_selector.hide();
}
}