1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +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);
}
ScrubbingToolBar *AudacityProject::GetScrubbingToolBar()
{
return dynamic_cast<ScrubbingToolBar*>
(mToolManager ?
mToolManager->GetToolBar(ScrubbingBarID) :
nullptr);
}
SelectionBar *AudacityProject::GetSelectionBar()
{
return (SelectionBar *)

View File

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

View File

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