mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-26 00:58:37 +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;
|
return;
|
||||||
|
|
||||||
auto &scrubber = GetProject()->GetScrubber();
|
auto &scrubber = GetProject()->GetScrubber();
|
||||||
if(scrubber.IsScrubbing())
|
if(scrubber.HasStartedScrubbing())
|
||||||
scrubber.StopScrubbing();
|
scrubber.StopScrubbing();
|
||||||
else switch (mMouseCapture)
|
else switch (mMouseCapture)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
#include "../../TrackPanelCell.h"
|
#include "../../TrackPanelCell.h"
|
||||||
#include "../../TrackPanelCellIterator.h"
|
#include "../../TrackPanelCellIterator.h"
|
||||||
#include "../../widgets/Ruler.h"
|
#include "../../widgets/Ruler.h"
|
||||||
|
#include "Scrubbing.h"
|
||||||
|
|
||||||
#include <wx/dc.h>
|
#include <wx/dc.h>
|
||||||
|
|
||||||
@ -113,8 +114,13 @@ void PlayIndicatorOverlay::OnTimer(wxCommandEvent &event)
|
|||||||
// Let other listeners get the notification
|
// Let other listeners get the notification
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
if (!mProject->IsAudioActive())
|
if (!mProject->IsAudioActive()) {
|
||||||
|
const auto &scrubber = mProject->GetScrubber();
|
||||||
|
if (scrubber.HasStartedScrubbing())
|
||||||
|
mNewIndicatorX = scrubber.GetScrubStartPosition();
|
||||||
|
else
|
||||||
mNewIndicatorX = -1;
|
mNewIndicatorX = -1;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ViewInfo &viewInfo = mProject->GetViewInfo();
|
ViewInfo &viewInfo = mProject->GetViewInfo();
|
||||||
|
|
||||||
|
@ -302,8 +302,11 @@ void Scrubber::ContinueScrubbing()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Scrubber::StopScrubbing()
|
void Scrubber::StopScrubbing()
|
||||||
{
|
{
|
||||||
|
mScrubStartPosition = -1;
|
||||||
|
mSmoothScrollingScrub = false;
|
||||||
|
|
||||||
if (IsScrubbing())
|
if (IsScrubbing())
|
||||||
{
|
{
|
||||||
if (gAudioIO->IsBusy()) {
|
if (gAudioIO->IsBusy()) {
|
||||||
|
@ -35,10 +35,17 @@ public:
|
|||||||
// Returns true iff the event should be considered consumed by this:
|
// Returns true iff the event should be considered consumed by this:
|
||||||
bool MaybeStartScrubbing(const wxMouseEvent &event);
|
bool MaybeStartScrubbing(const wxMouseEvent &event);
|
||||||
void ContinueScrubbing();
|
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 IsScrubbing() const;
|
||||||
bool IsScrollScrubbing() const // If true, implies IsScrubbing()
|
bool IsScrollScrubbing() const // If true, implies HasStartedScrubbing()
|
||||||
{ return mSmoothScrollingScrub; }
|
{ return mSmoothScrollingScrub; }
|
||||||
|
|
||||||
bool ShouldDrawScrubSpeed();
|
bool ShouldDrawScrubSpeed();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user