comparison main/MainWindow.cpp @ 345:e0c7ee104eb4

* Fix duplicate entries on right-button Layer menu when more than one audio file is loaded
author Chris Cannam
date Tue, 15 Jun 2010 10:54:15 +0000
parents 1fc7ee4ff506
children 92c09ced49ed
comparison
equal deleted inserted replaced
344:1fc7ee4ff506 345:e0c7ee104eb4
329 // That isn't desirable. I'm not sure it ever would be, in a 329 // That isn't desirable. I'm not sure it ever would be, in a
330 // context menu -- perhaps technically a Qt bug? 330 // context menu -- perhaps technically a Qt bug?
331 // m_rightButtonMenu->setTearOffEnabled(true); 331 // m_rightButtonMenu->setTearOffEnabled(true);
332 } 332 }
333 333
334 if (m_rightButtonLayerMenu) {
335 m_rightButtonLayerMenu->clear();
336 } else {
337 m_rightButtonLayerMenu = m_rightButtonMenu->addMenu(tr("&Layer"));
338 m_rightButtonLayerMenu->setTearOffEnabled(true);
339 m_rightButtonMenu->addSeparator();
340 }
341
342 if (m_rightButtonTransformsMenu) { 334 if (m_rightButtonTransformsMenu) {
343 m_rightButtonTransformsMenu->clear(); 335 m_rightButtonTransformsMenu->clear();
344 } else { 336 } else {
345 m_rightButtonTransformsMenu = m_rightButtonMenu->addMenu(tr("&Transform")); 337 m_rightButtonTransformsMenu = m_rightButtonMenu->addMenu(tr("&Transform"));
346 m_rightButtonTransformsMenu->setTearOffEnabled(true); 338 m_rightButtonTransformsMenu->setTearOffEnabled(true);
902 m_layerActions.clear(); 894 m_layerActions.clear();
903 m_layerMenu->clear(); 895 m_layerMenu->clear();
904 } else { 896 } else {
905 m_layerMenu = menuBar()->addMenu(tr("&Layer")); 897 m_layerMenu = menuBar()->addMenu(tr("&Layer"));
906 m_layerMenu->setTearOffEnabled(true); 898 m_layerMenu->setTearOffEnabled(true);
899 }
900
901 if (m_rightButtonLayerMenu) {
902 m_rightButtonLayerMenu->clear();
903 } else {
904 m_rightButtonLayerMenu = m_rightButtonMenu->addMenu(tr("&Layer"));
905 m_rightButtonLayerMenu->setTearOffEnabled(true);
906 m_rightButtonMenu->addSeparator();
907 } 907 }
908 908
909 QMenu *menu = m_paneMenu; 909 QMenu *menu = m_paneMenu;
910 910
911 IconLoader il; 911 IconLoader il;