Don't allow dragging audio markers to negative times

As ASS doesn't support negative times, some of the other code assumes
that times are >= 0, and it's never actually useful to have a negative
start time.

Originally committed to SVN as r6623.
This commit is contained in:
Thomas Goyne 2012-03-27 23:15:20 +00:00
parent e4043e64a3
commit 6e36a897d0
1 changed files with 3 additions and 0 deletions

View File

@ -815,6 +815,9 @@ std::vector<AudioMarker*> AudioTimingControllerDialogue::GetRightMarkers()
int AudioTimingControllerDialogue::SnapPosition(int position, int snap_range, std::vector<AudioMarker*> const& exclude) const
{
if (position < 0)
position = 0;
if (snap_range <= 0)
return position;