# HG changeset patch # User Chris Cannam # Date 1138211188 0 # Node ID 4d5d9aba406b82dbf2e15741e006866aece28e37 # Parent aa37f84ab70a700abe0d1cce9ceeaf614f42c4c9 * Fix update and play limits for play-selection mode when not looping * Fix playback in loop mode when no selection -- but the GUI update for this is still wrong on the flyback * Various fixes and improvements to making selections, particularly during playback * Draw selection under non-opaque non-scrollable layers, so as to improve cacheing * Show selection limits as text when drawing selection * Allow user to find missing audio files when loading session * Cross-fade selections when in play-selection mode -- mostly. We don't cross-fade on a processing block boundary, and unfortunately with short selections the selection boundary is quite likely to coincide with a block boundary. diff -r aa37f84ab70a -r 4d5d9aba406b layer/SpectrogramLayer.h --- a/layer/SpectrogramLayer.h Tue Jan 24 16:20:58 2006 +0000 +++ b/layer/SpectrogramLayer.h Wed Jan 25 17:46:28 2006 +0000 @@ -132,6 +132,8 @@ return PositionTop; } + virtual bool isLayerOpaque() const { return true; } + virtual int getCompletion() const; virtual QString getPropertyContainerIconName() const { return "spectrogram"; } diff -r aa37f84ab70a -r 4d5d9aba406b widgets/Pane.cpp --- a/widgets/Pane.cpp Tue Jan 24 16:20:58 2006 +0000 +++ b/widgets/Pane.cpp Wed Jan 25 17:46:28 2006 +0000 @@ -440,15 +440,20 @@ m_manager->setInProgressSelection(Selection(min, max), !m_ctrlPressed); } - - if (!m_manager || !m_manager->isPlaying()) { + + bool doScroll = false; + if (!m_manager) doScroll = true; + if (!m_manager->isPlaying()) doScroll = true; + if (m_followPlay != PlaybackScrollContinuous) doScroll = true; + + if (doScroll) { int offset = mouseFrame - getStartFrame(); int available = getEndFrame() - getStartFrame(); - if (offset >= available * 0.9) { - int move = int(offset - available * 0.9) + 1; + if (offset >= available * 0.95) { + int move = int(offset - available * 0.95) + 1; setCentreFrame(m_centreFrame + move); - } else if (offset <= available * 0.15) { - int move = int(available * 0.15 - offset) + 1; + } else if (offset <= available * 0.10) { + int move = int(available * 0.10 - offset) + 1; if (m_centreFrame > move) { setCentreFrame(m_centreFrame - move); } else { diff -r aa37f84ab70a -r 4d5d9aba406b widgets/Panner.h --- a/widgets/Panner.h Tue Jan 24 16:20:58 2006 +0000 +++ b/widgets/Panner.h Wed Jan 25 17:46:28 2006 +0000 @@ -46,6 +46,7 @@ virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void mouseMoveEvent(QMouseEvent *e); + virtual bool shouldLabelSelections() const { return false; } QPoint m_clickPos; QPoint m_mousePos;