13
0

stop range mode stuff from showing up when in internal edit mode

git-svn-id: svn://localhost/ardour2/branches/3.0@7154 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-25 01:13:45 +00:00
parent 7b82cb754e
commit 97721226a4
2 changed files with 37 additions and 30 deletions

View File

@ -324,30 +324,32 @@ Editor::mouse_mode_toggled (MouseMode m)
mouse_mode = m;
instant_save ();
if (mouse_mode != MouseRange && _join_object_range_state == JOIN_OBJECT_RANGE_NONE) {
/* in all modes except range and joined object/range, hide the range selection,
show the object (region) selection.
*/
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
(*i)->set_should_show_selection (true);
}
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->hide_selection ();
}
} else {
/*
in range or object/range mode, show the range selection.
*/
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
(*i)->show_selection (selection->time);
}
}
if (!internal_editing()) {
if (mouse_mode != MouseRange && _join_object_range_state == JOIN_OBJECT_RANGE_NONE) {
/* in all modes except range and joined object/range, hide the range selection,
show the object (region) selection.
*/
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
(*i)->set_should_show_selection (true);
}
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->hide_selection ();
}
} else {
/*
in range or object/range mode, show the range selection.
*/
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
(*i)->show_selection (selection->time);
}
}
}
set_canvas_cursor ();
}
@ -660,7 +662,9 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
break;
default:
_drags->set (new SelectionDrag (this, item, SelectionDrag::CreateSelection), event);
if (!internal_editing()) {
_drags->set (new SelectionDrag (this, item, SelectionDrag::CreateSelection), event);
}
}
return true;
break;
@ -2573,7 +2577,12 @@ Editor::set_internal_edit (bool yn)
}
}
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
(*i)->hide_selection ();
}
start_step_editing ();
set_canvas_cursor ();
} else {
@ -2588,11 +2597,9 @@ Editor::set_internal_edit (bool yn)
mtv->stop_step_editing ();
}
}
mouse_mode_toggled (mouse_mode);
}
set_canvas_cursor ();
}
/** Update _join_object_range_state which indicate whether we are over the top or bottom half of a region view,

View File

@ -411,7 +411,7 @@ MidiRegionView::canvas_event(GdkEvent* ev)
return true;
// Add note drag start
} else if (editor.current_mouse_mode() == MouseRange) {
} else if (editor.internal_editing()) {
group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
Gdk::Cursor(Gdk::FLEUR), ev->motion.time);
last_x = event_x;