From a86ca33d9b82372ea8d341932d180b08a7b0987f Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Sat, 24 Mar 2012 17:47:48 +0100 Subject: [PATCH] fixed timeline in medley mode --- Vocaluxe/Lib/Song/CNotes.cs | 11 +++++++++++ Vocaluxe/Screens/CScreenSing.cs | 27 +++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Vocaluxe/Lib/Song/CNotes.cs b/Vocaluxe/Lib/Song/CNotes.cs index adcb59fb..590b5932 100644 --- a/Vocaluxe/Lib/Song/CNotes.cs +++ b/Vocaluxe/Lib/Song/CNotes.cs @@ -274,6 +274,7 @@ namespace Vocaluxe.Lib.Song private int _StartBeat; private int _EndBeat; private bool _PerfectLine; // for drawing perfect line effect + private bool _VisibleInTimeLine; private int _MinBeat = int.MaxValue; private int _MaxBeat = int.MinValue; @@ -285,6 +286,7 @@ namespace Vocaluxe.Lib.Song StartBeat = int.MinValue; EndBeat = int.MaxValue; _PerfectLine = false; + _VisibleInTimeLine = true; } public CLine(CLine line) @@ -298,10 +300,17 @@ namespace Vocaluxe.Lib.Song _PerfectLine = line._PerfectLine; _MinBeat = line._MinBeat; _MaxBeat = line._MaxBeat; + _VisibleInTimeLine = line._VisibleInTimeLine; } #endregion Constructors #region Properties + public bool VisibleInTimeLine + { + get { return _VisibleInTimeLine; } + set { _VisibleInTimeLine = value; } + } + public int StartBeat { get { return _StartBeat; } @@ -508,6 +517,8 @@ namespace Vocaluxe.Lib.Song if (note.StartBeat < StartBeat || note.EndBeat > EndBeat) note.NoteType = ENoteType.Freestyle; } + + _VisibleInTimeLine = _MinBeat >= StartBeat && _MaxBeat <= EndBeat; } private void updateMinMaxBeat(CNote Note) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 2577fa6d..997f3858 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1087,19 +1087,22 @@ namespace Vocaluxe.Screens { CLine[] Line = Lines[i].Line; for(int j = 0; j