diff --git a/editor/studio/AMXX_Studio.exe b/editor/studio/AMXX_Studio.exe index 18c1e33a..3eb7d592 100755 Binary files a/editor/studio/AMXX_Studio.exe and b/editor/studio/AMXX_Studio.exe differ diff --git a/editor/studio/UnitfrmGoToLine.dfm b/editor/studio/UnitfrmGoToLine.dfm index 73274bb2..c93ce6d9 100755 Binary files a/editor/studio/UnitfrmGoToLine.dfm and b/editor/studio/UnitfrmGoToLine.dfm differ diff --git a/editor/studio/UnitfrmGoToLine.pas b/editor/studio/UnitfrmGoToLine.pas index ed665ce5..f0a62454 100755 --- a/editor/studio/UnitfrmGoToLine.pas +++ b/editor/studio/UnitfrmGoToLine.pas @@ -9,13 +9,14 @@ uses type TfrmGoToLine = class(TForm) + pnlBG: TSpTBXPanel; lblCaption: TLabel; - txtGoToLine: TSpTBXEdit; - cmdOK: TSpTBXButton; cmdCancel: TSpTBXButton; - procedure txtGoToLineChange(Sender: TObject); + cmdOK: TSpTBXButton; + txtGoToLine: TSpTBXEdit; procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char); procedure FormShow(Sender: TObject); + procedure txtGoToLineChange(Sender: TObject); end; var @@ -27,14 +28,6 @@ uses UnitMainTools; {$R *.DFM} -procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject); -begin - if not IsNumeric(txtGoToLine.Text) then - txtGoToLine.Text := '1' - else if txtGoToLine.Text = '0' then - txtGoToLine.Text := '1'; -end; - procedure TfrmGoToLine.txtGoToLineKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin @@ -46,6 +39,12 @@ end; procedure TfrmGoToLine.FormShow(Sender: TObject); begin txtGoToLine.SetFocus; + txtGoToLine.SelectAll; +end; + +procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject); +begin + cmdOK.Enabled := StrToIntDef(txtGoToLine.Text, -1) > 0; end; end.