mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:31:29 +02:00
Debugger: Improve asm view / center current line (fixed, did not work, when window was not already visible)
git-svn-id: trunk@45011 -
This commit is contained in:
parent
7e8693d62e
commit
5d2c7326ab
@ -110,7 +110,7 @@ type
|
|||||||
FCharWidth: Integer;
|
FCharWidth: Integer;
|
||||||
FGutterWidth: Integer;
|
FGutterWidth: Integer;
|
||||||
FUpdating: Boolean;
|
FUpdating: Boolean;
|
||||||
FUpdateNeeded: Boolean;
|
FUpdateNeeded, FVisibleChanged: Boolean;
|
||||||
|
|
||||||
FPowerImgIdx, FPowerImgIdxGrey: Integer;
|
FPowerImgIdx, FPowerImgIdxGrey: Integer;
|
||||||
FCurLineImgIdx: Integer;
|
FCurLineImgIdx: Integer;
|
||||||
@ -146,7 +146,9 @@ type
|
|||||||
procedure DoEditorOptsChanged(Sender: TObject; Restore: boolean);
|
procedure DoEditorOptsChanged(Sender: TObject; Restore: boolean);
|
||||||
protected
|
protected
|
||||||
function GetSourceCodeLine(SrcFileName: string; SrcLineNumber: Integer): string;
|
function GetSourceCodeLine(SrcFileName: string; SrcLineNumber: Integer): string;
|
||||||
procedure InitializeWnd; override;
|
procedure VisibleChanged; override;
|
||||||
|
procedure DoBeginUpdate; override;
|
||||||
|
procedure DoEndUpdate; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -536,10 +538,35 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAssemblerDlg.InitializeWnd;
|
procedure TAssemblerDlg.VisibleChanged;
|
||||||
begin
|
begin
|
||||||
inherited InitializeWnd;
|
inherited VisibleChanged;
|
||||||
DoEditorOptsChanged(nil, False);
|
if IsVisible then begin
|
||||||
|
if IsUpdating then begin
|
||||||
|
FVisibleChanged := True
|
||||||
|
end else begin
|
||||||
|
DoEditorOptsChanged(nil, False);
|
||||||
|
if FCurrentLocation <> 0 then
|
||||||
|
UpdateLocation(FCurrentLocation);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAssemblerDlg.DoBeginUpdate;
|
||||||
|
begin
|
||||||
|
FVisibleChanged := False;
|
||||||
|
inherited DoBeginUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAssemblerDlg.DoEndUpdate;
|
||||||
|
begin
|
||||||
|
inherited DoEndUpdate;
|
||||||
|
if FVisibleChanged then begin
|
||||||
|
DoEditorOptsChanged(nil, False);
|
||||||
|
if FCurrentLocation <> 0 then
|
||||||
|
UpdateLocation(FCurrentLocation);
|
||||||
|
end;
|
||||||
|
FVisibleChanged := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAssemblerDlg.pbAsmMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure TAssemblerDlg.pbAsmMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user