Commit 58fa2f8

Nick Faro committed on
Fix issue with drawing on wavetable
commit 58fa2f8ca3aac1455cfa14cef537973c490bde62 parent 9c9e36f
1 changed files +4−0
Modifiedsrc/tracker.pas +4−0
@@ -2882,6 +2882,10 @@ var
2882 begin 2882 begin
2883 X := EnsureRange(X, 0, WaveEditPaintBox.Width); 2883 X := EnsureRange(X, 0, WaveEditPaintBox.Width);
2884 Y := EnsureRange(Y, 0, WaveEditPaintBox.Height); 2884 Y := EnsureRange(Y, 0, WaveEditPaintBox.Height);
2885 if DrawingWave and not (ssLeft in Shift) then begin
2886 DrawingWave := False;
2887 Panic;
2888 end;
2885 if DrawingWave then begin 2889 if DrawingWave then begin
2886 Idx := EnsureRange(Round((X / WaveEditPaintBox.Width)*32), Low(TWave), High(TWave)); 2890 Idx := EnsureRange(Round((X / WaveEditPaintBox.Width)*32), Low(TWave), High(TWave));
2887 CurrentWave^[Idx] := EnsureRange(Round($F-((Y / WaveEditPaintBox.Height)*$F)), 0, $F); 2891 CurrentWave^[Idx] := EnsureRange(Round($F-((Y / WaveEditPaintBox.Height)*$F)), 0, $F);