1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 14:52:34 +02:00

un-confused editor indenting

This commit is contained in:
Paul Licameli 2017-02-12 10:11:17 -05:00
parent 81285ee0c1
commit 9af53f92cc
4 changed files with 28 additions and 25 deletions

View File

@ -6030,10 +6030,11 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
// We only want Wave and Note tracks here.
#if defined(USE_MIDI)
if (t->GetSelected() && ((t->GetKind() == Track::Wave) ||
(t->GetKind() == Track::Note))) {
(t->GetKind() == Track::Note)))
#else
if (t->GetSelected() && (t->GetKind() == Track::Wave)) {
if (t->GetSelected() && (t->GetKind() == Track::Wave))
#endif
{
offset = t->GetOffset();
if (t->GetLinked()) { // Left channel of stereo track.
leftOffset = offset;
@ -6115,10 +6116,11 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
// Only align Wave and Note tracks end to end.
#if defined(USE_MIDI)
if (t->GetSelected() && ((t->GetKind() == Track::Wave) ||
(t->GetKind() == Track::Note))) {
(t->GetKind() == Track::Note)))
#else
if (t->GetSelected() && (t->GetKind() == Track::Wave)) {
if (t->GetSelected() && (t->GetKind() == Track::Wave))
#endif
{
t->SetOffset(newPos); // Move the track
if (t->GetLinked()) { // Left channel of stereo track.

View File

@ -2195,17 +2195,17 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
// the desired fft bin(s) for display on that row
float *bins = (float*)alloca(sizeof(*bins)*(hiddenMid.height + 1));
{
const NumberScale numberScale(settings.GetScale(minFreq, maxFreq, rate, true));
const NumberScale numberScale(settings.GetScale(minFreq, maxFreq, rate, true));
NumberScale::Iterator it = numberScale.begin(mid.height);
float nextBin = std::max(0.0f, std::min(float(half - 1), *it));
NumberScale::Iterator it = numberScale.begin(mid.height);
float nextBin = std::max(0.0f, std::min(float(half - 1), *it));
int yy;
for (yy = 0; yy < hiddenMid.height; ++yy) {
bins[yy] = nextBin;
nextBin = std::max(0.0f, std::min(float(half - 1), *++it));
}
bins[yy] = nextBin;
int yy;
for (yy = 0; yy < hiddenMid.height; ++yy) {
bins[yy] = nextBin;
nextBin = std::max(0.0f, std::min(float(half - 1), *++it));
}
bins[yy] = nextBin;
}
#ifdef EXPERIMENTAL_FFT_Y_GRID

View File

@ -3458,25 +3458,25 @@ void TrackPanel::StartSlide(wxMouseEvent & event)
clickTime > mViewInfo->selectedRegion.t0() &&
clickTime < mViewInfo->selectedRegion.t1());
if ((vt->GetKind() == Track::Wave
WaveTrack *wt = vt->GetKind() == Track::Wave
? static_cast<WaveTrack*>(vt) : nullptr;
if ((wt
#ifdef USE_MIDI
|| vt->GetKind() == Track::Note
#endif
) && !event.ShiftDown())
{
#ifdef USE_MIDI
if (vt->GetKind() == Track::Wave) {
if (!wt)
mCapturedClip = NULL;
else
#endif
WaveTrack* wt = (WaveTrack*)vt;
{
mCapturedClip = wt->GetClipAtX(event.m_x);
if (mCapturedClip == NULL)
return;
#ifdef USE_MIDI
}
else {
mCapturedClip = NULL;
}
#endif
// The captured clip is the focus, but we need to create a list
// of all clips that have to move, also...

View File

@ -379,7 +379,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
}
}
#ifdef USE_MIDI
#ifdef USE_MIDI
// If file is a midi
if (targetfile.AfterLast(wxT('.')).IsSameAs(wxT("mid"), false)
|| targetfile.AfterLast(wxT('.')).IsSameAs(wxT("midi"), false))
@ -389,12 +389,13 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
// If not a midi, open audio file
else
{
#else // !USE_MIDI
#else // !USE_MIDI
/* if we don't have midi support, go straight on to opening as an
* audio file. TODO: Some sort of message here? */
#endif // USE_MIDI
{
#endif // USE_MIDI
mProject->OpenFile(targetfile);
}