void LOFImportFileHandle::doDuration() { if (callDurationFactor) { double longestDuration = mProject->GetTracks()->GetEndTime(); mProject->ZoomBy(longestDuration / durationFactor); callDurationFactor = false; } }
void LOFImportFileHandle::doDurationAndScrollOffset() { if (!mProject) return; bool doSomething = callDurationFactor || callScrollOffset; if (callDurationFactor) { double longestDuration = mProject->GetTracks()->GetEndTime(); mProject->ZoomBy(longestDuration / durationFactor); callDurationFactor = false; } if (callScrollOffset && (scrollOffset != 0)) { mProject->TP_ScrollWindow(scrollOffset); callScrollOffset = false; } if (doSomething) // Amend last undo state mProject->ModifyState(false); }