From cc9b880852450edb608ccef8ae4dc125386dfedd Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 27 Apr 2016 20:35:32 -0400 Subject: [PATCH] Conditional compilation flag can disabled the checkmarks in scrub sub menu --- src/tracks/ui/Scrubbing.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 3e158b04b..d76c5b4db 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -25,6 +25,9 @@ Paul Licameli split from TrackPanel.cpp #include +// Conditional compilation switch for making scrub menu items checkable +#define CHECKABLE_SCRUB_MENU_ITEMS + enum { // PRL: // Mouse must move at least this far to distinguish ctrl-drag to scrub @@ -742,9 +745,15 @@ void Scrubber::AddMenuItems() cm->BeginSubMenu(_("Scru&bbing")); for (const auto &item : menuItems) { +#ifdef CHECKABLE_SCRUB_MENU_ITEMS cm->AddCheck(item.name, wxGetTranslation(item.label), FNT(Scrubber, this, item.memFn), false, flags, mask); +#else + cm->AddItem(item.name, wxGetTranslation(item.label), + FNT(Scrubber, this, item.memFn), + flags, mask); +#endif } cm->EndSubMenu(); CheckMenuItem(); @@ -763,18 +772,22 @@ void Scrubber::PopulateMenu(wxMenu &menu) void Scrubber::UncheckAllMenuItems() { +#ifdef CHECKABLE_SCRUB_MENU_ITEMS auto cm = mProject->GetCommandManager(); for (const auto &item : menuItems) cm->Check(item.name, false); +#endif } void Scrubber::CheckMenuItem() { +#ifdef CHECKABLE_SCRUB_MENU_ITEMS if(HasStartedScrubbing()) { auto cm = mProject->GetCommandManager(); auto item = FindMenuItem(mSmoothScrollingScrub, mAlwaysSeeking); cm->Check(item.name, true); } +#endif } #endif