mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
mouse draw mode can draw AND select (and trim) notes (but trim cursors don't appear yet)
git-svn-id: svn://localhost/ardour2/branches/3.0@11470 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e061fa3009
commit
53cb1b6572
2 changed files with 25 additions and 5 deletions
|
|
@ -4066,7 +4066,10 @@ void
|
||||||
NoteDrag::finished (GdkEvent* ev, bool moved)
|
NoteDrag::finished (GdkEvent* ev, bool moved)
|
||||||
{
|
{
|
||||||
if (!moved) {
|
if (!moved) {
|
||||||
if (_editor->current_mouse_mode() == Editing::MouseObject) {
|
/* no motion - select note */
|
||||||
|
|
||||||
|
if (_editor->current_mouse_mode() == Editing::MouseObject ||
|
||||||
|
_editor->current_mouse_mode() == Editing::MouseDraw) {
|
||||||
|
|
||||||
if (_was_selected) {
|
if (_was_selected) {
|
||||||
bool add = Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier);
|
bool add = Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier);
|
||||||
|
|
|
||||||
|
|
@ -825,8 +825,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||||
ArdourCanvas::CanvasNote* cn = dynamic_cast<ArdourCanvas::CanvasNote*> (item);
|
ArdourCanvas::CanvasNote* cn = dynamic_cast<ArdourCanvas::CanvasNote*> (item);
|
||||||
if (cn && cn->big_enough_to_trim() && cn->mouse_near_ends()) {
|
if (cn && cn->big_enough_to_trim() && cn->mouse_near_ends()) {
|
||||||
_drags->set (new NoteResizeDrag (this, item), event, current_canvas_cursor);
|
_drags->set (new NoteResizeDrag (this, item), event, current_canvas_cursor);
|
||||||
} else {
|
|
||||||
_drags->set (new NoteDrag (this, item), event);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -868,6 +866,25 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MouseDraw:
|
||||||
|
switch (item_type) {
|
||||||
|
case NoteItem:
|
||||||
|
if (internal_editing()) {
|
||||||
|
/* trim notes if we're in internal edit mode and near the ends of the note */
|
||||||
|
ArdourCanvas::CanvasNote* cn = dynamic_cast<ArdourCanvas::CanvasNote*> (item);
|
||||||
|
if (cn && cn->big_enough_to_trim() && cn->mouse_near_ends()) {
|
||||||
|
_drags->set (new NoteResizeDrag (this, item), event, current_canvas_cursor);
|
||||||
|
} else {
|
||||||
|
_drags->set (new NoteDrag (this, item), event);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case MouseObject:
|
case MouseObject:
|
||||||
switch (item_type) {
|
switch (item_type) {
|
||||||
case NoteItem:
|
case NoteItem:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue