Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 715:d1c5444be23d tony_integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Fri, 09 May 2014 17:15:50 +0100 |
parents | 44fcce228d02 049a9418cc27 |
children | b959148258a4 |
line wrap: on
line diff
--- a/main/MainWindow.cpp Fri May 09 17:07:46 2014 +0100 +++ b/main/MainWindow.cpp Fri May 09 17:15:50 2014 +0100 @@ -915,7 +915,7 @@ action->setStatusTip(tr("Show or hide the centre line")); connect(action, SIGNAL(triggered()), this, SLOT(toggleCentreLine())); action->setCheckable(true); - action->setChecked(true); + action->setChecked(m_viewManager->shouldShowCentreLine()); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -930,12 +930,14 @@ QActionGroup *overlayGroup = new QActionGroup(this); + ViewManager::OverlayMode mode = m_viewManager->getOverlayMode(); + action = new QAction(tr("Show &No Overlays"), this); action->setShortcut(tr("0")); action->setStatusTip(tr("Hide times, layer names, and scale")); connect(action, SIGNAL(triggered()), this, SLOT(showNoOverlays())); action->setCheckable(true); - action->setChecked(false); + action->setChecked(mode == ViewManager::NoOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -945,7 +947,7 @@ action->setStatusTip(tr("Show times and basic scale")); connect(action, SIGNAL(triggered()), this, SLOT(showMinimalOverlays())); action->setCheckable(true); - action->setChecked(true); + action->setChecked(mode == ViewManager::StandardOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -955,7 +957,7 @@ action->setStatusTip(tr("Show times, layer names, and scale")); connect(action, SIGNAL(triggered()), this, SLOT(showAllOverlays())); action->setCheckable(true); - action->setChecked(false); + action->setChecked(mode == ViewManager::AllOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action);