diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs --- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs Fri Jan 08 11:33:24 2010 +0100 +++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs Thu Jan 14 16:39:50 2010 +0100 @@ -25,6 +25,11 @@ { SetValue(TrimLeftProperty, value); ((CustomableVideoElementVM)DataContext).BeginTrim = ((CustomableVideoElementVM)DataContext).BeginTrim.Add(new TimeSpan(0, 0, 0, 0, (int)((value) / ProductionTimeLine.ScaleTime))); + if (((CustomableVideoElementVM)DataContext).Duration < 1) + { + ((CustomableVideoElementVM)DataContext).BeginTrim= ((CustomableVideoElementVM)DataContext).RunTime - ((CustomableVideoElementVM)DataContext).EndTrim - TimeSpan.FromSeconds(1); + + } this.Width = ((CustomableVideoElementVM)DataContext).Duration ; } } @@ -44,7 +49,16 @@ { SetValue(TrimRightProperty, value); ((CustomableVideoElementVM)DataContext).EndTrim = ((CustomableVideoElementVM)DataContext).EndTrim.Add(new TimeSpan(0, 0, 0, 0, (int)((value) / ProductionTimeLine.ScaleTime))); - this.Width = ((CustomableVideoElementVM)DataContext).Duration; + + if (((CustomableVideoElementVM)DataContext).Duration<1) + { + ((CustomableVideoElementVM)DataContext).EndTrim = ((CustomableVideoElementVM)DataContext).RunTime -((CustomableVideoElementVM)DataContext).BeginTrim - TimeSpan.FromSeconds(1); + + } + + + this.Width = ((CustomableVideoElementVM)DataContext).Duration; + } } }