comparison view/View.cpp @ 224:9465b5375235

* Fix #1672407 confused by plugin-named files in cwd (or home?) * Fix #1491848 crash when loading new file while transform plugin runs * Fix #1502287 Background remains black after spectrogram layer deleted * Fix #1604477 Replacing the main audio file silences secondary audio file * Fix failure to initialise property box layout to last preference on startup * Fix resample/wrong-rate display in Pane, ensure that right rate is chosen if all current models have an acceptable rate even if previous main model had a different one * Fix "global zoom" broken in previous commit * Some fixes to spectrogram cache area updating (makes spectrogram appear more quickly, previously it had a tendency to refresh with empty space) * Fixes to colour 3d plot normalization
author Chris Cannam
date Thu, 08 Mar 2007 16:53:08 +0000
parents cd81066ac7ad
children 2ccd02015530
comparison
equal deleted inserted replaced
223:403bfb88d8d6 224:9465b5375235
42 m_zoomLevel(1024), 42 m_zoomLevel(1024),
43 m_followPan(true), 43 m_followPan(true),
44 m_followZoom(true), 44 m_followZoom(true),
45 m_followPlay(PlaybackScrollPage), 45 m_followPlay(PlaybackScrollPage),
46 m_playPointerFrame(0), 46 m_playPointerFrame(0),
47 m_lightBackground(true),
48 m_showProgress(showProgress), 47 m_showProgress(showProgress),
49 m_cache(0), 48 m_cache(0),
50 m_cacheCentreFrame(0), 49 m_cacheCentreFrame(0),
51 m_cacheZoomLevel(1024), 50 m_cacheZoomLevel(1024),
52 m_selectionCached(false), 51 m_selectionCached(false),
427 if (m_zoomLevel != int(z)) { 426 if (m_zoomLevel != int(z)) {
428 m_zoomLevel = z; 427 m_zoomLevel = z;
429 emit zoomLevelChanged(z, m_followZoom); 428 emit zoomLevelChanged(z, m_followZoom);
430 update(); 429 update();
431 } 430 }
431 }
432
433 bool
434 View::hasLightBackground() const
435 {
436 for (LayerList::const_iterator i = m_layers.begin();
437 i != m_layers.end(); ++i) {
438 if (!(*i)->hasLightBackground()) return false;
439 }
440 return true;
432 } 441 }
433 442
434 View::LayerProgressBar::LayerProgressBar(QWidget *parent) : 443 View::LayerProgressBar::LayerProgressBar(QWidget *parent) :
435 QProgressBar(parent) 444 QProgressBar(parent)
436 { 445 {
1612 "centre=\"%1\" " 1621 "centre=\"%1\" "
1613 "zoom=\"%2\" " 1622 "zoom=\"%2\" "
1614 "followPan=\"%3\" " 1623 "followPan=\"%3\" "
1615 "followZoom=\"%4\" " 1624 "followZoom=\"%4\" "
1616 "tracking=\"%5\" " 1625 "tracking=\"%5\" "
1617 "light=\"%6\" %7>\n") 1626 " %6>\n")
1618 .arg(m_centreFrame) 1627 .arg(m_centreFrame)
1619 .arg(m_zoomLevel) 1628 .arg(m_zoomLevel)
1620 .arg(m_followPan) 1629 .arg(m_followPan)
1621 .arg(m_followZoom) 1630 .arg(m_followZoom)
1622 .arg(m_followPlay == PlaybackScrollContinuous ? "scroll" : 1631 .arg(m_followPlay == PlaybackScrollContinuous ? "scroll" :
1623 m_followPlay == PlaybackScrollPage ? "page" : "ignore") 1632 m_followPlay == PlaybackScrollPage ? "page" : "ignore")
1624 .arg(m_lightBackground)
1625 .arg(extraAttributes); 1633 .arg(extraAttributes);
1626 1634
1627 for (size_t i = 0; i < m_layers.size(); ++i) { 1635 for (size_t i = 0; i < m_layers.size(); ++i) {
1628 bool visible = !m_layers[i]->isLayerDormant(this); 1636 bool visible = !m_layers[i]->isLayerDormant(this);
1629 s += m_layers[i]->toXmlString(indent + " ", 1637 s += m_layers[i]->toXmlString(indent + " ",