1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 00:58:37 +02:00

Scrub menu check items change pushed state of scrub toolbar buttons

This commit is contained in:
Paul Licameli 2016-06-06 00:50:51 -04:00
commit 6e7aac85a1
3 changed files with 14 additions and 0 deletions

View File

@ -4370,6 +4370,14 @@ MixerToolBar *AudacityProject::GetMixerToolBar()
NULL); NULL);
} }
ScrubbingToolBar *AudacityProject::GetScrubbingToolBar()
{
return dynamic_cast<ScrubbingToolBar*>
(mToolManager ?
mToolManager->GetToolBar(ScrubbingBarID) :
nullptr);
}
SelectionBar *AudacityProject::GetSelectionBar() SelectionBar *AudacityProject::GetSelectionBar()
{ {
return (SelectionBar *) return (SelectionBar *)

View File

@ -75,6 +75,7 @@ class EditToolBar;
class MeterToolBar; class MeterToolBar;
class MixerToolBar; class MixerToolBar;
class Scrubber; class Scrubber;
class ScrubbingToolBar;
class SelectionBar; class SelectionBar;
class SpectralSelectionBar; class SpectralSelectionBar;
class Toolbar; class Toolbar;
@ -442,6 +443,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
DeviceToolBar *GetDeviceToolBar(); DeviceToolBar *GetDeviceToolBar();
EditToolBar *GetEditToolBar(); EditToolBar *GetEditToolBar();
MixerToolBar *GetMixerToolBar(); MixerToolBar *GetMixerToolBar();
ScrubbingToolBar *GetScrubbingToolBar();
SelectionBar *GetSelectionBar(); SelectionBar *GetSelectionBar();
#ifdef EXPERIMENTAL_SPECTRAL_EDITING #ifdef EXPERIMENTAL_SPECTRAL_EDITING
SpectralSelectionBar *GetSpectralSelectionBar(); SpectralSelectionBar *GetSpectralSelectionBar();

View File

@ -21,6 +21,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../commands/CommandFunctors.h" #include "../../commands/CommandFunctors.h"
#include "../../prefs/PlaybackPrefs.h" #include "../../prefs/PlaybackPrefs.h"
#include "../../toolbars/ControlToolBar.h" #include "../../toolbars/ControlToolBar.h"
#include "../../toolbars/EditToolBar.h"
#undef USE_TRANSCRIPTION_TOOLBAR #undef USE_TRANSCRIPTION_TOOLBAR
#ifdef USE_TRANSCRIPTION_TOOLBAR #ifdef USE_TRANSCRIPTION_TOOLBAR
@ -787,6 +788,9 @@ void Scrubber::OnScrubOrSeek(bool &toToggle, bool &other)
// Update button images // Update button images
ruler->UpdateButtonStates(); ruler->UpdateButtonStates();
auto scrubbingToolBar = mProject->GetScrubbingToolBar();
scrubbingToolBar->EnableDisableButtons();
CheckMenuItem(); CheckMenuItem();
} }