Skip to content

Commit

Permalink
Reduce selection loss when changing mouse modes.
Browse files Browse the repository at this point in the history
Never change selection when smart mode toggled.
  • Loading branch information
nmains committed Jan 14, 2015
1 parent 44f2f53 commit 18c502f
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion gtk2_ardour/editor_mouse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,41 @@ Editor::update_time_selection_display ()
would destroy the range selection rectangle, which we need to stick
around for AutomationRangeDrag. */
selection->clear_regions ();
selection->clear_playlists ();
break;
default:
case MouseContent:
/* This handles internal edit.
Clear everything except points and notes.
*/
selection->clear_regions();
selection->clear_lines();
selection->clear_playlists ();

selection->clear_time ();
selection->clear_tracks ();
break;

case MouseTimeFX:
/* We probably want to keep region selection */
selection->clear_points ();
selection->clear_lines();
selection->clear_playlists ();

selection->clear_time ();
selection->clear_tracks ();
break;

case MouseAudition:
/*Don't lose lines or points if no action in this mode */
selection->clear_regions ();
selection->clear_playlists ();
selection->clear_time ();
selection->clear_tracks ();
break;

default:
/*Clear everything */
selection->clear_objects();
selection->clear_time ();
selection->clear_tracks ();
break;
Expand Down

0 comments on commit 18c502f

Please sign in to comment.