"options" fixes + some precautions for "SelectedTriangle"
This commit is contained in:
parent
60ae65b2ba
commit
ede0bbfded
@ -1437,12 +1437,12 @@ object EditForm: TEditForm
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 100
|
Height = 95
|
||||||
Caption = 'Transform color'
|
Caption = 'Transform color'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object pnlSymmetry: TPanel
|
object pnlSymmetry: TPanel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 70
|
Top = 62
|
||||||
Width = 73
|
Width = 73
|
||||||
Height = 21
|
Height = 21
|
||||||
Cursor = crHandPoint
|
Cursor = crHandPoint
|
||||||
@ -1459,9 +1459,9 @@ object EditForm: TEditForm
|
|||||||
OnMouseUp = DragPanelMouseUp
|
OnMouseUp = DragPanelMouseUp
|
||||||
end
|
end
|
||||||
object scrlXFormColor: TScrollBar
|
object scrlXFormColor: TScrollBar
|
||||||
Left = 8
|
Left = 9
|
||||||
Top = 46
|
Top = 38
|
||||||
Width = 129
|
Width = 128
|
||||||
Height = 15
|
Height = 15
|
||||||
LargeChange = 10
|
LargeChange = 10
|
||||||
Max = 1000
|
Max = 1000
|
||||||
@ -1497,7 +1497,7 @@ object EditForm: TEditForm
|
|||||||
end
|
end
|
||||||
object txtSymmetry: TEdit
|
object txtSymmetry: TEdit
|
||||||
Left = 80
|
Left = 80
|
||||||
Top = 70
|
Top = 62
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
@ -1508,7 +1508,7 @@ object EditForm: TEditForm
|
|||||||
end
|
end
|
||||||
object GroupBox2: TGroupBox
|
object GroupBox2: TGroupBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 108
|
Top = 100
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 137
|
Height = 137
|
||||||
Caption = 'Graph'
|
Caption = 'Graph'
|
||||||
|
@ -420,8 +420,6 @@ var
|
|||||||
gCenterX: double;
|
gCenterX: double;
|
||||||
gCenterY: double;
|
gCenterY: double;
|
||||||
|
|
||||||
HelpersEnabled: boolean = true;
|
|
||||||
|
|
||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
{ Triangle transformations }
|
{ Triangle transformations }
|
||||||
@ -2140,6 +2138,10 @@ begin
|
|||||||
else if (Button = mbRight) and viewDragMode then
|
else if (Button = mbRight) and viewDragMode then
|
||||||
begin
|
begin
|
||||||
viewDragMode := false;
|
viewDragMode := false;
|
||||||
|
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
SetCaptureControl(nil);
|
||||||
|
|
||||||
if viewDragged=false then // haven't dragged - popup menu then
|
if viewDragged=false then // haven't dragged - popup menu then
|
||||||
begin
|
begin
|
||||||
GetCursorPos(mousepos); // hmmm
|
GetCursorPos(mousepos); // hmmm
|
||||||
@ -2153,9 +2155,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else viewDragged := false;
|
else viewDragged := false;
|
||||||
Screen.Cursor := crDefault;
|
|
||||||
SetCaptureControl(nil);
|
|
||||||
//exit;
|
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2177,20 +2176,11 @@ begin
|
|||||||
EditForm.Width := Registry.ReadInteger('Width');
|
EditForm.Width := Registry.ReadInteger('Width');
|
||||||
if Registry.ValueExists('Height') then
|
if Registry.ValueExists('Height') then
|
||||||
EditForm.Height := Registry.ReadInteger('Height');
|
EditForm.Height := Registry.ReadInteger('Height');
|
||||||
{ Options }
|
|
||||||
if Registry.ValueExists('UseTransformColors') then
|
|
||||||
begin
|
|
||||||
UseTransformColors := Registry.ReadBool('UseTransformColors');
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
UseTransformColors := False;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if Registry.ValueExists('ResetLocation') then
|
if Registry.ValueExists('ResetLocation') then
|
||||||
mnuResetLoc.checked := Registry.ReadBool('ResetLocation')
|
mnuResetLoc.checked := Registry.ReadBool('ResetLocation')
|
||||||
else mnuResetLoc.checked := true;
|
else
|
||||||
//tbResetLoc.Down := mnuResetLoc.checked;
|
mnuResetLoc.checked := false;
|
||||||
if Registry.ValueExists('HelpersEnabled') then
|
if Registry.ValueExists('HelpersEnabled') then
|
||||||
HelpersEnabled := Registry.ReadBool('HelpersEnabled')
|
HelpersEnabled := Registry.ReadBool('HelpersEnabled')
|
||||||
else
|
else
|
||||||
@ -2214,15 +2204,16 @@ begin
|
|||||||
trkVarPreviewDepth.Position := Registry.ReadInteger('VariationPreviewDepth');
|
trkVarPreviewDepth.Position := Registry.ReadInteger('VariationPreviewDepth');
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
UseTransformColors := False;
|
|
||||||
UseFlameBackground := False;
|
UseFlameBackground := False;
|
||||||
mnuResetLoc.checked := true;
|
mnuResetLoc.checked := false;
|
||||||
end;
|
end;
|
||||||
Registry.CloseKey;
|
Registry.CloseKey;
|
||||||
finally
|
finally
|
||||||
Registry.Free;
|
Registry.Free;
|
||||||
end;
|
end;
|
||||||
chkUseXFormColor.checked := UseTransformColors;
|
chkUseXFormColor.checked := UseTransformColors;
|
||||||
|
chkHelpers.Checked := HelpersEnabled;
|
||||||
|
|
||||||
if ExtendedEdit then tbExtendedEdit.Down := true
|
if ExtendedEdit then tbExtendedEdit.Down := true
|
||||||
else tbMove.Down := true;
|
else tbMove.Down := true;
|
||||||
UpdateDisplay;
|
UpdateDisplay;
|
||||||
@ -2503,14 +2494,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ Options }
|
{ Options }
|
||||||
// Registry.WriteBool('UseFlameBackground', UseFlameBackground);
|
// Registry.WriteBool('UseFlameBackground', UseFlameBackground);
|
||||||
{
|
|
||||||
Registry.WriteBool('UseTransformColors', UseTransformColors);
|
|
||||||
Registry.WriteInteger('BackgroundColor', BackgroundColor);
|
|
||||||
Registry.WriteInteger('GridColor1', GridColor1);
|
|
||||||
Registry.WriteInteger('GridColor2', GridColor2);
|
|
||||||
Registry.WriteInteger('HelpersColor', HelpersColor);
|
|
||||||
Registry.WriteInteger('ReferenceTriangleColor', ReferenceTriangleColor);
|
|
||||||
}
|
|
||||||
Registry.WriteBool('ResetLocation', mnuResetLoc.checked);
|
Registry.WriteBool('ResetLocation', mnuResetLoc.checked);
|
||||||
Registry.WriteBool('VariationPreview', showVarPreview);
|
Registry.WriteBool('VariationPreview', showVarPreview);
|
||||||
Registry.WriteBool('HelpersEnabled', HelpersEnabled);
|
Registry.WriteBool('HelpersEnabled', HelpersEnabled);
|
||||||
@ -2650,10 +2633,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditForm.cbTransformsChange(Sender: TObject);
|
procedure TEditForm.cbTransformsChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
n: integer;
|
||||||
begin
|
begin
|
||||||
if SelectedTriangle <> cbTransforms.ItemIndex then SelectedTriangle := cbTransforms.ItemIndex;
|
n := cbTransforms.ItemIndex;
|
||||||
ShowSelectedInfo;
|
if (n <> SelectedTriangle) and (n >= 0) and (n <= LastTriangle) then
|
||||||
TriangleView.Invalidate;
|
begin
|
||||||
|
SelectedTriangle := n;
|
||||||
|
ShowSelectedInfo;
|
||||||
|
TriangleView.Invalidate;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditForm.cbTransformsDrawItem(Control: TWinControl;
|
procedure TEditForm.cbTransformsDrawItem(Control: TWinControl;
|
||||||
|
Loading…
Reference in New Issue
Block a user