Example #1
0
void LOFImportFileHandle::doDuration()
{
   if (callDurationFactor)
   {
      double longestDuration = mProject->GetTracks()->GetEndTime();
      mProject->ZoomBy(longestDuration / durationFactor);
      callDurationFactor = false;
   }
}
Example #2
0
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);
}