From 3ca48f660e31cd85cf691a9c0e62989ffcd903fe Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Fri, 5 Jun 2009 00:02:26 +0000 Subject: [PATCH] Close #839, the Shift Times function will now only do something if shifting by a non-zero number of milliseconds, or always if shifting by a number of frames (even zero). Originally committed to SVN as r3017. --- aegisub/src/dialog_shift_times.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aegisub/src/dialog_shift_times.cpp b/aegisub/src/dialog_shift_times.cpp index 36369f24e..ecd1d9664 100644 --- a/aegisub/src/dialog_shift_times.cpp +++ b/aegisub/src/dialog_shift_times.cpp @@ -221,6 +221,13 @@ void DialogShiftTimes::OnOK(wxCommandEvent &event) { if (byTime) len = ShiftTime->time.GetMS(); else ShiftFrame->GetValue().ToLong(&len); + if (byTime && len == 0) { + // Shift zero milliseconds in time mode + // Equivalent to doing nothing at all, so just dismiss + EndModal(0); + return; + } + // If backwards, invert if (backward) len = -len;