1
0
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:
BusinessmanProgrammerSteve
2010-03-13 17:40:17 +00:00
parent 6860fca483
commit 2b3a50bd09
5 changed files with 40 additions and 20 deletions

View File

@@ -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();