From 32a79c703b1fc0ea671896c844165c6c56fb5350 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 17 Jan 2019 15:10:37 -0500 Subject: [PATCH] Redo 429fad6 without special logic in PrefsDialog.cpp --- src/prefs/PrefsDialog.cpp | 7 ------- src/prefs/SpectrumPrefs.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/prefs/PrefsDialog.cpp b/src/prefs/PrefsDialog.cpp index 9d4c02bf0..74d92a6be 100644 --- a/src/prefs/PrefsDialog.cpp +++ b/src/prefs/PrefsDialog.cpp @@ -440,13 +440,6 @@ void PrefsDialog::OnPreview(wxCommandEvent & WXUNUSED(event)) void PrefsDialog::OnHelp(wxCommandEvent & WXUNUSED(event)) { wxString page = GetCurrentPanel()->HelpPageName(); - // Currently (May2017) Spectrum Settings is the only preferences - // we ever display in a dialog on its own without others. - // We do so when it is configuring spectrums for a track. - // Because this happens, we want to visit a different help page. - // So we change the page name in the case of a page on its own. - if( !mCategories) - page.Replace( "Spectrograms_Preferences", "Spectrogram_Settings" ); HelpSystem::ShowHelp(this, page, true); } diff --git a/src/prefs/SpectrumPrefs.cpp b/src/prefs/SpectrumPrefs.cpp index ffa9a5d80..98d9f93dd 100644 --- a/src/prefs/SpectrumPrefs.cpp +++ b/src/prefs/SpectrumPrefs.cpp @@ -536,7 +536,14 @@ void SpectrumPrefs::EnableDisableSTFTOnlyControls() wxString SpectrumPrefs::HelpPageName() { - return "Spectrograms_Preferences"; + // Currently (May2017) Spectrum Settings is the only preferences + // we ever display in a dialog on its own without others. + // We do so when it is configuring spectrums for a track. + // Because this happens, we want to visit a different help page. + // So we change the page name in the case of a page on its own. + return mWt + ? "Spectrogram_Settings" + : "Spectrograms_Preferences"; } BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)