diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-08 08:43:52 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-08 08:44:21 -0400 |
commit | da0bd3d8a50955a3242b42bd0a752a68a763c4f4 (patch) | |
tree | 9f122d28f7e624b6a72875761cfe6dcb98fc621b /gtk2_ardour/editor_selection.cc | |
parent | 295a7dfcf3acf664046ca5331555647ddd4b0dbc (diff) |
fix region action sensitivity issues.
Desensitize all region actions initially, and toggle that state
appropriately when region selection changes
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 639e87a848..ea6c40f1b2 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1088,7 +1088,6 @@ Editor::sensitize_all_region_actions (bool s) void Editor::sensitize_the_right_region_actions () { - RegionSelection rs = get_regions_from_selection_and_entered (); sensitize_all_region_actions (!rs.empty ()); @@ -1373,11 +1372,15 @@ Editor::region_selection_changed () _regions->block_change_connection (false); editor_regions_selection_changed_connection.block(false); - if (!_all_region_actions_sensitized) { - /* This selection change might have changed what region actions - are allowed, so sensitize them all in case a key is pressed. - */ - sensitize_all_region_actions (true); + if (selection->regions.empty()) { + sensitize_all_region_actions (false); + } else { + if (!_all_region_actions_sensitized) { + /* This selection change might have changed what region actions + are allowed, so sensitize them all in case a key is pressed. + */ + sensitize_all_region_actions (true); + } } if (_session && !_session->transport_rolling() && !selection->regions.empty()) { |