mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-08 17:46:25 +01:00
1. Consolidate linking enable/disable logic b/w Edit Toolbar and Menu
2. Save user's preference for enabling linking 3. fix a bug by which changes to global prefs like SWPlaythrough were not visually reflected in other open projects.
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "../AudioIO.h"
|
||||
#include "../ImageManipulation.h"
|
||||
#include "../Internat.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../Theme.h"
|
||||
#include "../UndoManager.h"
|
||||
@@ -240,15 +241,7 @@ void EditToolBar::OnButton(wxCommandEvent &event)
|
||||
break;
|
||||
#ifdef EXPERIMENTAL_LINKING
|
||||
case ETBLinkID:
|
||||
if (!busy){
|
||||
p->OnStickyLabel();
|
||||
if (p->GetStickyFlag())
|
||||
mButtons[ETBLinkID]->PushDown();
|
||||
else
|
||||
mButtons[ETBLinkID]->PopUp();
|
||||
p->ModifyToolbarMenus();
|
||||
p->GetTrackPanel()->Refresh(false);
|
||||
}
|
||||
if (!busy) p->OnStickyLabel();
|
||||
return;//avoiding the call to SetButton()
|
||||
#endif
|
||||
case ETBZoomInID:
|
||||
@@ -313,7 +306,10 @@ void EditToolBar::EnableDisableButtons()
|
||||
mButtons[ETBPasteID]->SetEnabled(p->Clipboard());
|
||||
|
||||
#ifdef EXPERIMENTAL_LINKING
|
||||
if (p->GetStickyFlag())
|
||||
bool linkTracks;
|
||||
gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, true);
|
||||
|
||||
if (linkTracks)
|
||||
mButtons[ETBLinkID]->PushDown();
|
||||
else
|
||||
mButtons[ETBLinkID]->PopUp();
|
||||
|
||||
Reference in New Issue
Block a user