mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
freehand line drawing: automation & velocity share the same basic code
This commit is contained in:
parent
2c48aabe08
commit
df52c39ce0
9 changed files with 235 additions and 107 deletions
|
|
@ -82,6 +82,7 @@
|
|||
#include "mouse_cursors.h"
|
||||
#include "editor_cursors.h"
|
||||
#include "region_peak_cursor.h"
|
||||
#include "velocity_ghost_region.h"
|
||||
#include "verbose_cursor.h"
|
||||
#include "note.h"
|
||||
|
||||
|
|
@ -902,6 +903,16 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
return true;
|
||||
break;
|
||||
|
||||
case VelocityBaseItem:
|
||||
{
|
||||
VelocityGhostRegion* grv = static_cast<VelocityGhostRegion*> (item->get_data ("ghostregionview"));
|
||||
if (grv) {
|
||||
_drags->set (new VelocityLineDrag (this, grv->base_item(), Temporal::BeatTime), event);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1569,6 +1580,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
/* see if we're finishing a drag */
|
||||
|
||||
if (_drags->active ()) {
|
||||
|
||||
bool const r = _drags->end_grab (event);
|
||||
if (r) {
|
||||
/* grab dragged, so do nothing else */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue