- begin_reversible_selection_op (X_("Invert Selection"));
- selection->set (touched);
- commit_reversible_selection_op ();
+ begin_reversible_selection_op (X_("Invert Track Selection"));
+ selection->set (inverted);
+ commit_reversible_selection_op ();
+
+ } else {
+
+ list<Selectable *> touched;
+
+ for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
+ if ((*iter)->hidden()) {
+ continue;
+ }
+ (*iter)->get_inverted_selectables (*selection, touched);
+ }
+
+ begin_reversible_selection_op (X_("Invert ObjectSelection"));
+ selection->set (touched);
+ commit_reversible_selection_op ();
+ }