act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-draw"));
break;
- case MouseGain:
- act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-gain"));
- break;
-
case MouseTimeFX:
act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-timefx"));
break;
act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-draw"));
break;
- case MouseGain:
- act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-gain"));
- break;
-
case MouseTimeFX:
act = ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-timefx"));
break;
if (((mouse_mode != MouseObject) &&
(mouse_mode != MouseAudition || item_type != RegionItem) &&
(mouse_mode != MouseTimeFX || item_type != RegionItem) &&
- (mouse_mode != MouseGain) &&
(mouse_mode != MouseDraw)) ||
((event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE) || event->button.button > 3) ||
(internal_editing() && mouse_mode != MouseTimeFX)) {
return true;
break;
- case MouseDraw:
- switch (item_type) {
- case NoteItem:
- /* Existing note: allow trimming/motion */
- if (internal_editing()) {
- /* trim notes if we're in internal edit mode and near the ends of the note */
- NoteBase* cn = reinterpret_cast<NoteBase*>(item->get_data ("notebase"));
- assert (cn);
- if (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;
- case StreamItem:
- if (internal_editing()) {
- if (dynamic_cast<MidiTimeAxisView*> (clicked_axisview)) {
- _drags->set (new RegionCreateDrag (this, item, clicked_axisview), event);
- }
- return true;
- }
- break;
-
- default:
- break;
- }
- break;
-
case MouseCut:
switch (item_type) {
case RegionItem:
return true;
break;
- case MouseGain:
+ case MouseDraw:
switch (item_type) {
case GainLineItem:
_drags->set (new LineDrag (this, item), event);
case AutomationLineItem:
_drags->set (new LineDrag (this, item), event);
break;
-
+
+ case NoteItem:
+ /* Existing note: allow trimming/motion */
+ if (internal_editing()) {
+ /* trim notes if we're in internal edit mode and near the ends of the note */
+ NoteBase* cn = reinterpret_cast<NoteBase*>(item->get_data ("notebase"));
+ assert (cn);
+ if (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;
+
+ case StreamItem:
+ if (internal_editing()) {
+ if (dynamic_cast<MidiTimeAxisView*> (clicked_axisview)) {
+ _drags->set (new RegionCreateDrag (this, item, clicked_axisview), event);
+ }
+ return true;
+ }
+ break;
+
default:
break;
}
}
switch (eff) {
- case MouseObject:
case MouseDraw:
- switch (item_type) {
- case AutomationTrackItem:
- atv = dynamic_cast<AutomationTimeAxisView*>(clicked_axisview);
- if (atv) {
- bool with_guard_points = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
- atv->add_automation_event (event, where, event->button.y, with_guard_points);
- }
- return true;
- break;
- default:
- break;
- }
- break;
-
- case MouseGain:
switch (item_type) {
case RegionItem:
{
case AutomationTrackItem: {
bool with_guard_points = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
- dynamic_cast<AutomationTimeAxisView*>(clicked_axisview)->
- add_automation_event (event, where, event->button.y, with_guard_points);
+ atv = dynamic_cast<AutomationTimeAxisView*>(clicked_axisview);
+ if (atv) {
+ atv->add_automation_event (event, where, event->button.y, with_guard_points);
+ }
return true;
break;
}
switch (item_type) {
case ControlPointItem:
- if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
+ if (mouse_mode == MouseDraw || mouse_mode == MouseObject) {
cp = static_cast<ControlPoint*>(item->get_data ("control_point"));
cp->show ();
break;
case GainLineItem:
- if (mouse_mode == MouseGain) {
+ if (mouse_mode == MouseDraw) {
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
if (line) {
line->set_outline_color (ARDOUR_UI::config()->get_EnteredGainLine());
break;
case AutomationLineItem:
- if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
+ if (mouse_mode == MouseDraw || mouse_mode == MouseObject) {
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
if (line) {
line->set_outline_color (ARDOUR_UI::config()->get_EnteredAutomationLine());
(*i)->leave_internal_edit_mode ();
}
- if (mouse_mode == MouseDraw && pre_internal_mouse_mode != MouseDraw) {
- /* we were drawing .. flip back to something sensible */
- set_mouse_mode (pre_internal_mouse_mode);
- }
-
set_snap_to (pre_internal_snap_type);
set_snap_mode (pre_internal_snap_mode);
}