mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 12:29:21 +02:00
IDE: assembler window: fixed showing while docked
git-svn-id: trunk@46949 -
This commit is contained in:
parent
f4feff3146
commit
62c23192e8
@ -146,9 +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 VisibleChanged; override;
|
|
||||||
procedure DoBeginUpdate; override;
|
procedure DoBeginUpdate; override;
|
||||||
procedure DoEndUpdate; override;
|
procedure DoEndUpdate; override;
|
||||||
|
procedure UpdateShowing; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -241,6 +241,7 @@ begin
|
|||||||
FCurrentLocation := 0;
|
FCurrentLocation := 0;
|
||||||
FLocation := 0;
|
FLocation := 0;
|
||||||
FLineCount := 0;
|
FLineCount := 0;
|
||||||
|
FLineHeight := 10;
|
||||||
SetLength(FLineMap, FLineCount + 1);
|
SetLength(FLineMap, FLineCount + 1);
|
||||||
FGutterWidth := 32;
|
FGutterWidth := 32;
|
||||||
FDisassemblerNotification := TIDEDisassemblerNotification.Create;
|
FDisassemblerNotification := TIDEDisassemblerNotification.Create;
|
||||||
@ -258,8 +259,6 @@ begin
|
|||||||
Caption := lisDisAssAssembler;
|
Caption := lisDisAssAssembler;
|
||||||
|
|
||||||
EditorOpts.AddHandlerAfterWrite(@DoEditorOptsChanged);
|
EditorOpts.AddHandlerAfterWrite(@DoEditorOptsChanged);
|
||||||
pbAsm.Font.Size := EditorOpts.EditorFontSize;
|
|
||||||
pbAsm.Font.Name := EditorOpts.EditorFont;
|
|
||||||
Caption := lisMenuViewAssembler;
|
Caption := lisMenuViewAssembler;
|
||||||
CopyToClipboard.Caption := lisDbgAsmCopyToClipboard;
|
CopyToClipboard.Caption := lisDbgAsmCopyToClipboard;
|
||||||
|
|
||||||
@ -538,20 +537,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAssemblerDlg.VisibleChanged;
|
|
||||||
begin
|
|
||||||
inherited VisibleChanged;
|
|
||||||
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;
|
procedure TAssemblerDlg.DoBeginUpdate;
|
||||||
begin
|
begin
|
||||||
FVisibleChanged := False;
|
FVisibleChanged := False;
|
||||||
@ -569,6 +554,20 @@ begin
|
|||||||
FVisibleChanged := False;
|
FVisibleChanged := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TAssemblerDlg.UpdateShowing;
|
||||||
|
begin
|
||||||
|
inherited UpdateShowing;
|
||||||
|
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.pbAsmMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure TAssemblerDlg.pbAsmMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if Button <> mbLeft then exit;
|
if Button <> mbLeft then exit;
|
||||||
@ -851,7 +850,7 @@ begin
|
|||||||
FCharWidth := TM.tmMaxCharWidth; // EditorOpts.ExtraCharSpacing +
|
FCharWidth := TM.tmMaxCharWidth; // EditorOpts.ExtraCharSpacing +
|
||||||
sbHorizontal.SmallChange := FCHarWidth;
|
sbHorizontal.SmallChange := FCHarWidth;
|
||||||
|
|
||||||
FLineHeight := EditorOpts.ExtraLineSpacing + TM.tmHeight;
|
FLineHeight := Max(6,EditorOpts.ExtraLineSpacing + TM.tmHeight);
|
||||||
SetLineCount(pbAsm.Height div FLineHeight);
|
SetLineCount(pbAsm.Height div FLineHeight);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user