@@ -415,6 +415,7 @@ void MainWindow::setupWindowStructure()
415415 errorPane = new QTextBrowser;
416416 metroPane = new SonicPiMetro (m_spClient, m_spAPI, theme, this );
417417
418+
418419 connect (metroPane, SIGNAL (linkEnabled ()), this , SLOT (checkEnableLinkMenu ()));
419420 connect (metroPane, SIGNAL (linkDisabled ()), this , SLOT (uncheckEnableLinkMenu ()));
420421
@@ -1365,22 +1366,9 @@ void MainWindow::enableScsynthInputsMenuChanged()
13651366 changeEnableScsynthInputs ();
13661367}
13671368
1368- void MainWindow::enableLinkMenuChanged ()
1369- {
1370- if (enableLinkAct->isChecked ())
1371- {
1372- metroPane->linkEnable ();
1373- }
1374- else
1375- {
1376- metroPane->linkDisable ();
1377- }
1378- }
1379-
13801369void MainWindow::toggleLinkMenu ()
13811370{
1382- enableLinkAct->setChecked (!enableLinkAct->isChecked ());
1383- enableLinkMenuChanged ();
1371+ metroPane->toggleLink ();
13841372}
13851373
13861374void MainWindow::uncheckEnableLinkMenu ()
@@ -3538,6 +3526,7 @@ void MainWindow::createToolBar()
35383526 enableLinkAct->setChecked (false );
35393527 connect (enableLinkAct, SIGNAL (triggered ()), this , SLOT (toggleLinkMenu ()));
35403528
3529+
35413530 linkTapTempoAct = new QAction (tr (" Tap Tempo" ), this );
35423531 connect (linkTapTempoAct, SIGNAL (triggered ()), metroPane, SLOT (tapTempo ()));
35433532
0 commit comments