diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index ee25a77a26..e6d7a83bba 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -2181,14 +2181,19 @@ begin FExecutionMark := TSourceMark.Create(EditorComponent, nil); SourceEditorMarks.Add(FExecutionMark); EditorComponent.Marks.Add(FExecutionMark); - FExecutionMark.ImageIndex := SourceEditorMarks.CurrentLineImg; FExecutionMark.LineColorAttrib := ahaExecutionPoint; FExecutionMark.Priority := 1; end; - if ExecutionLine <> -1 then - FExecutionMark.Line := ExecutionLine; FExecutionMark.Visible := ExecutionLine <> -1; + if FExecutionMark.Visible then + begin + FExecutionMark.Line := ExecutionLine; + if SourceEditorMarks.FindBreakPointMark(EditorComponent, ExecutionLine) <> nil then + FExecutionMark.ImageIndex := SourceEditorMarks.CurrentLineBreakPointImg + else + FExecutionMark.ImageIndex := SourceEditorMarks.CurrentLineImg; + end; end; procedure TSourceEditor.SetExecutionLine(NewLine: integer); diff --git a/ide/sourcemarks.pas b/ide/sourcemarks.pas index ac5fb7bbc2..a7916a83e8 100644 --- a/ide/sourcemarks.pas +++ b/ide/sourcemarks.pas @@ -139,6 +139,7 @@ type TSourceMarks = class(TComponent) private fActiveBreakPointImg: Integer; + FCurrentLineBreakPointImg: Integer; FCurrentLineImg: Integer; FImgList: TImageList; fInactiveBreakPointImg: Integer; @@ -190,6 +191,7 @@ type property MultiBreakPointImg: Integer read fMultiBreakPointImg; property UnknownBreakPointImg: Integer read fUnknownBreakPointImg; property CurrentLineImg: Integer read FCurrentLineImg; + property CurrentLineBreakPointImg: Integer read FCurrentLineBreakPointImg; end; var @@ -522,6 +524,8 @@ begin fMultiBreakPointImg:=AddImage('MultiBreakPoint'); // load current line image FCurrentLineImg:=AddImage('debugger_current_line'); + // load current line + breakpoint image + FCurrentLineBreakPointImg:=AddImage('debugger_current_line_breakpoint'); end; function TSourceMarks.FindFirstMarkNode(ASynEdit: TCustomSynEdit; ALine: integer