+ switch (effective_mouse_mode()) {
+/*
+ * case MouseGain: {
+ //find regions's gain line
+ AudioRegionView *rview = dynamic_cast<AudioRegionView*>(clicked_regionview);
+ AutomationTimeAxisView *tview = dynamic_cast<AutomationTimeAxisView*>(clicked_trackview);
+ if (rview) {
+ AudioRegionGainLine *line = rview->get_gain_line();
+ if (!line) break;
+
+ //cut region gain points in the selection
+ AutomationList& alist (line->the_list());
+ XMLNode &before = alist.get_state();
+ AutomationList* what_we_got = 0;
+ if ((what_we_got = alist.cut (selection->time.front().start - rview->audio_region()->position(), selection->time.front().end - rview->audio_region()->position())) != 0) {
+ session->add_command(new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
+ delete what_we_got;
+ what_we_got = 0;
+ }
+
+ rview->set_envelope_visible(true);
+ rview->audio_region()->set_envelope_active(true);
+
+ } else if (tview) {
+ AutomationLine *line = *(tview->lines.begin());
+ if (!line) break;
+
+ //cut auto points in the selection
+ AutomationList& alist (line->the_list());
+ XMLNode &before = alist.get_state();
+ AutomationList* what_we_got = 0;
+ if ((what_we_got = alist.cut (selection->time.front().start, selection->time.front().end)) != 0) {
+ session->add_command(new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
+ delete what_we_got;
+ what_we_got = 0;
+ }
+ } else
+ break;
+ } break;
+*/
+ case MouseObject:
+ case MouseRange:
+ if (!rs.empty() || !selection->points.empty()) {