# HG changeset patch # User Chris Cannam # Date 1141840078 0 # Node ID 75cfbc6e709b6cd3d388dd081aed609905219288 # Parent 2818ec5d198506bd9ece47292ed97def17eef054 * more MainWindow/Document stuff diff -r 2818ec5d1985 -r 75cfbc6e709b widgets/Pane.cpp --- a/widgets/Pane.cpp Wed Mar 08 12:38:28 2006 +0000 +++ b/widgets/Pane.cpp Wed Mar 08 17:47:58 2006 +0000 @@ -300,21 +300,28 @@ if (waveformModel) { + size_t mainModelRate = m_manager->getMainModelSampleRate(); + size_t playbackRate = m_manager->getPlaybackSampleRate(); + + QString srNote = ""; + // Show (R) for waveform models that will be resampled on - // playback. + // playback, and (X) for waveform models that will be + // played at the wrong rate because their rate differs + // from that of the main model. - //!!! Inadequate for auxiliary waveform layers, which are - //played at the wrong rate if their rate differs from the - //main model. Need to discover and label with (X) or - //something. - + if (sampleRate == mainModelRate) { + if (sampleRate != playbackRate) srNote = " " + tr("(R)"); + } else { + srNote = " " + tr("(X)"); + } + QString desc = tr("%1 / %2Hz%3") .arg(RealTime::frame2RealTime(waveformModel->getEndFrame(), sampleRate) .toText(false).c_str()) .arg(sampleRate) - .arg((m_manager && - sampleRate != m_manager->getPlaybackSampleRate()) ? " (R)" : ""); + .arg(srNote); paint.drawText(width() - paint.fontMetrics().width(desc) - 5, height() - paint.fontMetrics().height() +