1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-02 17:23:18 +02:00

Where if and else branches were the same, simplify...

... None of the examples was really a bug.

ExpandingToolBar.cpp is unused in fact.
This commit is contained in:
Paul Licameli 2017-10-11 22:12:23 -04:00
parent 8529350707
commit 7c73011629
4 changed files with 14 additions and 14 deletions

View File

@ -299,12 +299,12 @@ AButton::AButtonState AButton::GetState()
}
}
else {
if (mToggle) {
//if (mToggle) {
state = mButtonIsDown ? AButtonDown : AButtonUp;
}
else {
state = mButtonIsDown ? AButtonDown : AButtonUp;
}
//}
//else {
//state = mButtonIsDown ? AButtonDown : AButtonUp;
//}
}
return state;

View File

@ -391,10 +391,10 @@ LWSlider::LWSlider(wxWindow *parent,
break;
case DB_SLIDER:
minValue = -36.0f;
if (orientation == wxHORIZONTAL)
//if (orientation == wxHORIZONTAL)
maxValue = 36.0f;
else
maxValue = 36.0f; // for MixerBoard //v Previously was 6dB for MixerBoard, but identical for now.
//else
//maxValue = 36.0f; // for MixerBoard //v Previously was 6dB for MixerBoard, but identical for now.
stepValue = 1.0f;
speed = 0.5;
break;

View File

@ -291,10 +291,10 @@ class ExpandingToolBarEvtHandler final : public wxEvtHandler
bool ProcessEvent(wxEvent& evt) override
{
if (mToolBar->IsCursorInWindow())
mToolBar->TryAutoExpand();
else
// if (mToolBar->IsCursorInWindow())
mToolBar->TryAutoExpand();
// else
// mToolBar->TryAutoExpand();
return mInheritedEvtHandler->ProcessEvent(evt);
}

View File

@ -2427,10 +2427,10 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
// Do this hack so scrubber can detect mouse drags anywhere
evt.ResumePropagation(wxEVENT_PROPAGATE_MAX);
if (scrubber.IsScrubbing())
evt.Skip();
else
//if (scrubber.IsScrubbing())
evt.Skip();
//else
//evt.Skip();
// Don't do this, it slows down drag-scrub on Mac.
// Timer updates of display elsewhere make it unnecessary.