1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

More apt argument name

This commit is contained in:
Paul Licameli 2018-06-09 15:09:51 -04:00
parent 8e51391b98
commit ed660bdca2
2 changed files with 6 additions and 8 deletions

View File

@ -517,11 +517,11 @@ void ControlToolBar::SetStop(bool down)
EnableDisableButtons();
}
void ControlToolBar::SetRecord(bool down, bool append)
void ControlToolBar::SetRecord(bool down, bool altAppearance)
{
if (down)
{
mRecord->SetAlternateIdx(append ? 1 : 0);
mRecord->SetAlternateIdx(altAppearance ? 1 : 0);
mRecord->PushDown();
}
else
@ -1025,16 +1025,14 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
if (evt.GetInt() == 2)
mRecord->SetShift(false);
SetRecord(true, mRecord->WasShiftDown());
bool altAppearance = mRecord->WasShiftDown();
SetRecord(true, altAppearance);
bool success = false;
bool appendRecord = mRecord->WasShiftDown();
bool bPreferNewTrack;
gPrefs->Read("/GUI/PreferNewTrackRecord", &bPreferNewTrack, false);
if (!bPreferNewTrack)
appendRecord = !appendRecord;
bool appendRecord = (altAppearance == bPreferNewTrack);
auto cleanup = finally([&] {
if (!success) {

View File

@ -83,7 +83,7 @@ class ControlToolBar final : public ToolBar {
//These allow buttons to be controlled externally:
void SetPlay(bool down, PlayAppearance appearance = PlayAppearance::Straight);
void SetStop(bool down);
void SetRecord(bool down, bool append=false);
void SetRecord(bool down, bool altAppearance = false);
bool IsPauseDown() const;
bool IsRecordDown() const;