mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-03 09:09:47 +02:00
Bug1052: Appearance should change immediately after ctrl-(double-)click...
This commit is contained in:
commit
724a5d0a3a
@ -1151,7 +1151,7 @@ void TrackPanel::HandleEscapeKey(bool down)
|
||||
return;
|
||||
|
||||
auto &scrubber = GetProject()->GetScrubber();
|
||||
if(scrubber.IsScrubbing())
|
||||
if(scrubber.HasStartedScrubbing())
|
||||
scrubber.StopScrubbing();
|
||||
else switch (mMouseCapture)
|
||||
{
|
||||
|
@ -17,6 +17,7 @@ Paul Licameli split from TrackPanel.cpp
|
||||
#include "../../TrackPanelCell.h"
|
||||
#include "../../TrackPanelCellIterator.h"
|
||||
#include "../../widgets/Ruler.h"
|
||||
#include "Scrubbing.h"
|
||||
|
||||
#include <wx/dc.h>
|
||||
|
||||
@ -113,8 +114,13 @@ void PlayIndicatorOverlay::OnTimer(wxCommandEvent &event)
|
||||
// Let other listeners get the notification
|
||||
event.Skip();
|
||||
|
||||
if (!mProject->IsAudioActive())
|
||||
mNewIndicatorX = -1;
|
||||
if (!mProject->IsAudioActive()) {
|
||||
const auto &scrubber = mProject->GetScrubber();
|
||||
if (scrubber.HasStartedScrubbing())
|
||||
mNewIndicatorX = scrubber.GetScrubStartPosition();
|
||||
else
|
||||
mNewIndicatorX = -1;
|
||||
}
|
||||
else {
|
||||
ViewInfo &viewInfo = mProject->GetViewInfo();
|
||||
|
||||
|
@ -302,8 +302,11 @@ void Scrubber::ContinueScrubbing()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Scrubber::StopScrubbing()
|
||||
void Scrubber::StopScrubbing()
|
||||
{
|
||||
mScrubStartPosition = -1;
|
||||
mSmoothScrollingScrub = false;
|
||||
|
||||
if (IsScrubbing())
|
||||
{
|
||||
if (gAudioIO->IsBusy()) {
|
||||
|
@ -35,10 +35,17 @@ public:
|
||||
// Returns true iff the event should be considered consumed by this:
|
||||
bool MaybeStartScrubbing(const wxMouseEvent &event);
|
||||
void ContinueScrubbing();
|
||||
bool StopScrubbing();
|
||||
void StopScrubbing();
|
||||
|
||||
wxCoord GetScrubStartPosition() const
|
||||
{ return mScrubStartPosition; }
|
||||
|
||||
// True iff the user has clicked to start scrub and not yet stopped,
|
||||
// but IsScrubbing() may yet be false
|
||||
bool HasStartedScrubbing() const
|
||||
{ return GetScrubStartPosition() >= 0; }
|
||||
bool IsScrubbing() const;
|
||||
bool IsScrollScrubbing() const // If true, implies IsScrubbing()
|
||||
bool IsScrollScrubbing() const // If true, implies HasStartedScrubbing()
|
||||
{ return mSmoothScrollingScrub; }
|
||||
|
||||
bool ShouldDrawScrubSpeed();
|
||||
|
Loading…
x
Reference in New Issue
Block a user