Mercurial > hg > svgui
comparison view/Pane.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 | 403bfb88d8d6 |
children | 6dab3ac2fe73 |
comparison
equal
deleted
inserted
replaced
223:403bfb88d8d6 | 224:9465b5375235 |
---|---|
231 | 231 |
232 if (m_manager && m_manager->getZoomWheelsEnabled() && | 232 if (m_manager && m_manager->getZoomWheelsEnabled() && |
233 width() > 120 && height() > 100) { | 233 width() > 120 && height() > 100) { |
234 if (!m_headsUpDisplay->isVisible()) { | 234 if (!m_headsUpDisplay->isVisible()) { |
235 m_headsUpDisplay->show(); | 235 m_headsUpDisplay->show(); |
236 connect(m_manager, SIGNAL(viewZoomLevelChanged(View *, unsigned long, bool)), | |
237 this, SLOT(viewZoomLevelChanged(View *, unsigned long, bool))); | |
238 } | 236 } |
239 if (haveVThumb) { | 237 if (haveVThumb) { |
240 m_headsUpDisplay->setFixedHeight(m_vthumb->height() + m_hthumb->height()); | 238 m_headsUpDisplay->setFixedHeight(m_vthumb->height() + m_hthumb->height()); |
241 m_headsUpDisplay->move(width() - 86, height() - 86); | 239 m_headsUpDisplay->move(width() - 86, height() - 86); |
242 } else { | 240 } else { |
243 m_headsUpDisplay->setFixedHeight(m_hthumb->height()); | 241 m_headsUpDisplay->setFixedHeight(m_hthumb->height()); |
244 m_headsUpDisplay->move(width() - 86, height() - 16); | 242 m_headsUpDisplay->move(width() - 86, height() - 16); |
245 } | 243 } |
246 } else { | 244 } else { |
247 m_headsUpDisplay->hide(); | 245 m_headsUpDisplay->hide(); |
248 if (m_manager) { | |
249 disconnect(m_manager, SIGNAL(viewZoomLevelChanged(View *, unsigned long, bool)), | |
250 this, SLOT(viewZoomLevelChanged(View *, unsigned long, bool))); | |
251 } | |
252 } | 246 } |
253 } | 247 } |
254 | 248 |
255 void | 249 void |
256 Pane::updateVerticalPanner() | 250 Pane::updateVerticalPanner() |
569 m_manager && | 563 m_manager && |
570 m_manager->shouldShowDuration() && | 564 m_manager->shouldShowDuration() && |
571 r.y() + r.height() >= height() - fontHeight - 6) { | 565 r.y() + r.height() >= height() - fontHeight - 6) { |
572 | 566 |
573 size_t modelRate = waveformModel->getSampleRate(); | 567 size_t modelRate = waveformModel->getSampleRate(); |
574 size_t mainModelRate = m_manager->getMainModelSampleRate(); | |
575 size_t playbackRate = m_manager->getPlaybackSampleRate(); | 568 size_t playbackRate = m_manager->getPlaybackSampleRate(); |
576 | 569 size_t outputRate = m_manager->getOutputSampleRate(); |
570 | |
577 QString srNote = ""; | 571 QString srNote = ""; |
578 | 572 |
579 // Show (R) for waveform models that will be resampled on | 573 // Show (R) for waveform models that will be resampled on |
580 // playback, and (X) for waveform models that will be played | 574 // playback, and (X) for waveform models that will be played |
581 // at the wrong rate because their rate differs from that of | 575 // at the wrong rate because their rate differs from the |
582 // the main model. | 576 // current playback rate (which is not necessarily that of the |
583 | 577 // main model). |
584 if (modelRate == mainModelRate) { | 578 |
585 if (modelRate != playbackRate) srNote = " " + tr("(R)"); | 579 if (playbackRate != 0) { |
586 } else { | 580 if (modelRate == playbackRate) { |
587 // std::cerr << "Sample rate = " << modelRate << ", main model rate = " << mainModelRate << std::endl; | 581 if (modelRate != outputRate) srNote = " " + tr("(R)"); |
588 srNote = " " + tr("(X)"); | 582 } else { |
589 } | 583 srNote = " " + tr("(X)"); |
584 } | |
585 } | |
590 | 586 |
591 QString desc = tr("%1 / %2Hz%3") | 587 QString desc = tr("%1 / %2Hz%3") |
592 .arg(RealTime::frame2RealTime(waveformModel->getEndFrame(), | 588 .arg(RealTime::frame2RealTime(waveformModel->getEndFrame(), |
593 sampleRate) | 589 sampleRate) |
594 .toText(false).c_str()) | 590 .toText(false).c_str()) |
1626 updateHeadsUpDisplay(); | 1622 updateHeadsUpDisplay(); |
1627 update(); | 1623 update(); |
1628 } | 1624 } |
1629 | 1625 |
1630 void | 1626 void |
1631 Pane::viewZoomLevelChanged(View *v, unsigned long, bool locked) | 1627 Pane::viewZoomLevelChanged(View *v, unsigned long z, bool locked) |
1632 { | 1628 { |
1633 // std::cerr << "Pane[" << this << "]::zoomLevelChanged (global now " | 1629 // std::cerr << "Pane[" << this << "]::zoomLevelChanged (global now " |
1634 // << (m_manager ? m_manager->getGlobalZoom() : 0) << ")" << std::endl; | 1630 // << (m_manager ? m_manager->getGlobalZoom() : 0) << ")" << std::endl; |
1631 | |
1632 View::viewZoomLevelChanged(v, z, locked); | |
1633 | |
1634 if (!m_vthumb->isVisible()) return; | |
1635 | 1635 |
1636 if (v != this) { | 1636 if (v != this) { |
1637 if (!locked || !m_followZoom) return; | 1637 if (!locked || !m_followZoom) return; |
1638 } | 1638 } |
1639 | 1639 |