mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-01-31 21:11:39 +01:00
Make sure snapping distance is calculated without changing zoom level first
This commit is contained in:
parent
2d92e9e702
commit
634f7a37bb
@ -131,6 +131,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
private double _zoomFactor = 1.0; // 1.0=no zoom
|
||||
|
||||
public int ShotChangeSnapPixels = 8;
|
||||
private bool _snappingDistanceFirstUpdated = false;
|
||||
|
||||
public double ZoomFactor
|
||||
{
|
||||
@ -327,6 +328,11 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
_subtitle = new Subtitle();
|
||||
_noClear = false;
|
||||
_wavePeaks = value;
|
||||
|
||||
if (!_snappingDistanceFirstUpdated)
|
||||
{
|
||||
UpdateSnappingDistance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2734,6 +2740,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
var snappingDistance = (int) Math.Round(pixelsPerFrame * Math.Max(1, largestGapInFrames));
|
||||
|
||||
ShotChangeSnapPixels = Math.Max(8, snappingDistance);
|
||||
_snappingDistanceFirstUpdated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user