diff options
author | nick_m <mainsbridge@gmail.com> | 2015-11-01 06:06:31 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-11-01 06:06:31 +1100 |
commit | 00a1d23d8332dcddbf5e78396302d621fa8bcaca (patch) | |
tree | ee0e7b5d034e522216ccdedf4d1f479784333242 /gtk2_ardour/editor.cc | |
parent | 336f8d47fe810ee9d057632854e009f1616d272e (diff) |
Grey out unavailable note context menu items rather than hiding them.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 5601fd4987..3a19e0da68 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5964,26 +5964,29 @@ Editor::popup_note_context_menu (ArdourCanvas::Item* item, GdkEvent* event) sigc::mem_fun(mrv, &MidiRegionView::delete_selection))); } - if (sel_size == 1) { - items.push_back(MenuElem(_("Edit..."), - sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv))); + items.push_back(MenuElem(_("Edit..."), + sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv))); + if (sel_size != 1) { + items.back().set_sensitive (false); } items.push_back(MenuElem(_("Transpose..."), sigc::bind(sigc::mem_fun(*this, &Editor::transpose_regions), rs))); - if (sel_size > 1) { - items.push_back(MenuElem(_("Legatize"), - sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, false))); + + items.push_back(MenuElem(_("Legatize"), + sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, false))); + if (sel_size < 2) { + items.back().set_sensitive (false); } items.push_back(MenuElem(_("Quantize..."), sigc::bind(sigc::mem_fun(*this, &Editor::quantize_regions), rs))); - if (sel_size > 1) { - items.push_back(MenuElem(_("Remove Overlap"), - sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, true))); - + items.push_back(MenuElem(_("Remove Overlap"), + sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, true))); + if (sel_size < 2) { + items.back().set_sensitive (false); } items.push_back(MenuElem(_("Transform..."), |