1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 01:21:16 +02:00

Now implement scrubbing default to unpinned, see commit ac1017e...

... This was motivated by punch and roll recording:  it appears most convenient
to pin the head for recording purposes, and drag it near the right, but when
stopping and finding the splice point for the correction, it is better to
scrub unpinned.
This commit is contained in:
Paul Licameli
2018-08-30 11:51:28 -04:00
parent 3eccdd9bd1
commit af276ac4f9
7 changed files with 59 additions and 6 deletions

View File

@@ -2210,7 +2210,7 @@ public:
static std::shared_ptr<PlayheadHandle>
HitTest( const AudacityProject *pProject, wxCoord xx )
{
if( TracksPrefs::GetPinnedHeadPreference() &&
if( ControlToolBar::IsTransportingPinned() &&
pProject->IsAudioActive() )
{
const auto targetX = GetPlayHeadX( pProject );
@@ -2373,7 +2373,7 @@ private:
if (!scrubber.HasMark()) {
// Asynchronous scrub poller gets activated here
scrubber.MarkScrubStart(
event.event.m_x, TracksPrefs::GetPinnedHeadPreference(), false);
event.event.m_x, Scrubber::ShouldScrubPinned(), false);
}
}
}
@@ -3287,6 +3287,8 @@ void AdornedRulerPanel::UpdateButtonStates()
};
{
// The button always reflects the pinned head preference, even though
// there is also a Playback preference that may overrule it for scrubbing
bool state = TracksPrefs::GetPinnedHeadPreference();
auto pinButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
if( !state )
@@ -3664,7 +3666,7 @@ void AdornedRulerPanel::DoDrawIndicator
dc->DrawPolygon( 3, tri );
}
else {
bool pinned = TracksPrefs::GetPinnedHeadPreference();
bool pinned = ControlToolBar::IsTransportingPinned();
wxBitmap & bmp = theTheme.Bitmap( pinned ?
(playing ? bmpPlayPointerPinned : bmpRecordPointerPinned) :
(playing ? bmpPlayPointer : bmpRecordPointer)