Commit b5e53cd

Nick Faro committed on
kabcorp last typed thing
commit b5e53cddd9cd89c630e6632815e3e51482d00bc8 parent f33316b
1 changed files +15−2
Modifiedsrc/trackergrid.pas +15−2
@@ -113,6 +113,8 @@ type
113 Performed: TUndoDeque; 113 Performed: TUndoDeque;
114 Recall: TRedoStack; 114 Recall: TRedoStack;
115 115
116 LastFxParam: array [0..15] of Byte;
117
116 FHighlightedRow: Integer; 118 FHighlightedRow: Integer;
117 FFontSize: Integer; 119 FFontSize: Integer;
118 procedure SetFontSize(AValue: Integer); 120 procedure SetFontSize(AValue: Integer);
@@ -339,6 +341,8 @@ constructor TTrackerGrid.Create(
339 PatternMap: TPatternMap; 341 PatternMap: TPatternMap;
340 NumColumns: Integer; 342 NumColumns: Integer;
341 NumRows: Integer); 343 NumRows: Integer);
344 var
345 I: Integer;
342 begin 346 begin
343 inherited Create(AOwner); 347 inherited Create(AOwner);
344 348
@@ -360,6 +364,9 @@ begin
360 Performed := TUndoDeque.Create; 364 Performed := TUndoDeque.Create;
361 Recall := TRedoStack.Create; 365 Recall := TRedoStack.Create;
362 366
367 for I := Low(LastFxParam) to High(LastFxParam) do
368 LastFxParam[I] := Byte(0);
369
363 DoubleBuffered := True; 370 DoubleBuffered := True;
364 ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csDoubleClicks]; 371 ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csDoubleClicks];
365 Self.Parent := Parent; 372 Self.Parent := Parent;
@@ -1162,7 +1169,11 @@ begin
1162 EffectCode := 0; 1169 EffectCode := 0;
1163 EffectParams.Value := 0; 1170 EffectParams.Value := 0;
1164 end 1171 end
1165 else KeycodeToHexNumber(Key, EffectCode); 1172 else begin
1173 KeycodeToHexNumber(Key, EffectCode);
1174 if EffectParams.Value = 0 then
1175 EffectParams.Value := LastFxParam[EffectCode];
1176 end;
1166 1177
1167 Invalidate; 1178 Invalidate;
1168 EndUndoAction; 1179 EndUndoAction;
@@ -1178,8 +1189,10 @@ begin
1178 EffectCode := 0; 1189 EffectCode := 0;
1179 EffectParams.Value := 0; 1190 EffectParams.Value := 0;
1180 end 1191 end
1181 else if KeycodeToHexNumber(Key, Temp) then 1192 else if KeycodeToHexNumber(Key, Temp) then begin
1182 EffectParams.Value := ((EffectParams.Value mod $10) * $10) + Temp; 1193 EffectParams.Value := ((EffectParams.Value mod $10) * $10) + Temp;
1194 LastFxParam[EffectCode] := EffectParams.Value;
1195 end;
1183 1196
1184 Invalidate; 1197 Invalidate;
1185 EndUndoAction; 1198 EndUndoAction;