You've already forked lazarus-ccr
Sudoku: DigitSetEditor:
- disallow setting values that are not in original DigitsPPossible set - disallow clearing the set entirely git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7250 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -226,16 +226,17 @@ end;
|
||||
procedure TScratchForm.EditCell(ACol, ARow: Integer);
|
||||
var
|
||||
S: String;
|
||||
DigitSet: TDigitSet;
|
||||
CurrentDigitSet: TDigitSet;
|
||||
begin
|
||||
S := ScratchGrid.Cells[ACol, ARow];
|
||||
DigitSet := StrToDigitSet(S);
|
||||
DigitSetEditorForm.DigitSet := DigitSet;
|
||||
CurrentDigitSet := StrToDigitSet(S);
|
||||
DigitSetEditorForm.OriginalDigitsPossible := FRawData[ACol+1,ARow+1].DigitsPossible; //always set this first
|
||||
DigitSetEditorForm.CurrentDigitSet := CurrentDigitSet;
|
||||
DigitSetEditorForm.Top := Top;
|
||||
DigitSetEditorForm.PreferredRight := Left;
|
||||
if (DigitSetEditorForm.ShowModal = mrOK) then
|
||||
begin
|
||||
S := DigitSetToStr(DigitSetEditorForm.DigitSet);
|
||||
S := DigitSetToStr(DigitSetEditorForm.CurrentDigitSet);
|
||||
ScratchGrid.Cells[ACol, ARow] := S;
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user