diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-29 16:05:03 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-29 16:15:41 -0500 |
commit | fbe236999d48e592c3de7ce7450077593ccc3ce8 (patch) | |
tree | eb21c52b3caa1c85436c577d2b39d2621bffc526 /gtk2_ardour/selection.h | |
parent | 9fe4b7a92a03d934691d9c2f8d4f0014520e5e0f (diff) |
modify Selection API to provide (default-valued) "with_signal" argument to all ::clear_*() methods
This allows the clear methods to be used before calling ::add(), to avoid the
emission of a signal saying "there are no <foo> selected right now".
There should be no side-effects from this commit.
Note that correct use of this new API is complex, and requires avoiding the use
of wrapper methods like clear_objects().
Diffstat (limited to 'gtk2_ardour/selection.h')
-rw-r--r-- | gtk2_ardour/selection.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h index 586c2e8997..aa9510beed 100644 --- a/gtk2_ardour/selection.h +++ b/gtk2_ardour/selection.h @@ -200,18 +200,18 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList void clear_all() { clear_time(); clear_tracks(); clear_objects(); } - void clear_time(); //clears any time selection ( i.e. Range ) - void clear_tracks (); //clears the track header selections - void clear_objects(); //clears the items listed below + void clear_time(bool with_signal = true); //clears any time selection ( i.e. Range ) + void clear_tracks (bool with_signal = true); //clears the track header selections + void clear_objects(bool with_signal = true); //clears the items listed below // these items get cleared wholesale in clear_objects - void clear_regions(); - void clear_lines (); - void clear_playlists (); - void clear_points (); - void clear_markers (); - void clear_midi_notes (); - void clear_midi_regions (); + void clear_regions(bool with_signal = true); + void clear_lines (bool with_signal = true); + void clear_playlists (bool with_signal = true); + void clear_points (bool with_signal = true); + void clear_markers (bool with_signal = true); + void clear_midi_notes (bool with_signal = true); + void clear_midi_regions (bool with_signal = true); void foreach_region (void (ARDOUR::Region::*method)(void)); void foreach_regionview (void (RegionView::*method)(void)); |