Grey out unavailable note context menu items rather than hiding them.
This commit is contained in:
parent
336f8d47fe
commit
00a1d23d83
@ -5964,26 +5964,29 @@ Editor::popup_note_context_menu (ArdourCanvas::Item* item, GdkEvent* event)
|
|||||||
sigc::mem_fun(mrv, &MidiRegionView::delete_selection)));
|
sigc::mem_fun(mrv, &MidiRegionView::delete_selection)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sel_size == 1) {
|
items.push_back(MenuElem(_("Edit..."),
|
||||||
items.push_back(MenuElem(_("Edit..."),
|
sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv)));
|
||||||
sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv)));
|
if (sel_size != 1) {
|
||||||
|
items.back().set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
items.push_back(MenuElem(_("Transpose..."),
|
items.push_back(MenuElem(_("Transpose..."),
|
||||||
sigc::bind(sigc::mem_fun(*this, &Editor::transpose_regions), rs)));
|
sigc::bind(sigc::mem_fun(*this, &Editor::transpose_regions), rs)));
|
||||||
|
|
||||||
if (sel_size > 1) {
|
|
||||||
items.push_back(MenuElem(_("Legatize"),
|
items.push_back(MenuElem(_("Legatize"),
|
||||||
sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, false)));
|
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..."),
|
items.push_back(MenuElem(_("Quantize..."),
|
||||||
sigc::bind(sigc::mem_fun(*this, &Editor::quantize_regions), rs)));
|
sigc::bind(sigc::mem_fun(*this, &Editor::quantize_regions), rs)));
|
||||||
|
|
||||||
if (sel_size > 1) {
|
items.push_back(MenuElem(_("Remove Overlap"),
|
||||||
items.push_back(MenuElem(_("Remove Overlap"),
|
sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, true)));
|
||||||
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..."),
|
items.push_back(MenuElem(_("Transform..."),
|
||||||
|
Loading…
Reference in New Issue
Block a user