Clamp y for newly added automation line points.
git-svn-id: svn://localhost/ardour2/branches/3.0@7457 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f9d88d0979
commit
f58a810af8
|
@ -299,12 +299,11 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
|||
bool
|
||||
ARDOUR_UI::run_startup (bool should_be_new, string load_template)
|
||||
{
|
||||
if (_startup == 0) {
|
||||
_startup = new ArdourStartup ();
|
||||
}
|
||||
|
||||
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
|
||||
delete _startup;
|
||||
_startup = new ArdourStartup ();
|
||||
|
||||
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
|
||||
|
||||
if (audio_setup && _startup->engine_control()) {
|
||||
_startup->engine_control()->set_state (*audio_setup);
|
||||
}
|
||||
|
|
|
@ -97,6 +97,10 @@ AutomationRegionView::canvas_event(GdkEvent* ev)
|
|||
/* convert to item coordinates in the time axis view */
|
||||
automation_view()->canvas_display()->w2i (x, y);
|
||||
|
||||
/* clamp y */
|
||||
y = max (y, 0.0);
|
||||
y = min (y, _height - NAME_HIGHLIGHT_SIZE);
|
||||
|
||||
add_automation_event (ev, trackview.editor().pixel_to_frame (x) - _region->position(), y);
|
||||
}
|
||||
|
||||
|
@ -154,8 +158,9 @@ AutomationRegionView::set_height (double h)
|
|||
{
|
||||
RegionView::set_height(h);
|
||||
|
||||
if (_line)
|
||||
if (_line) {
|
||||
_line->set_height ((uint32_t)rint(h - NAME_HIGHLIGHT_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue