mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:39:17 +02:00
IDE/Options: Removing code duplication in method TEditorColorOptionsFrame.ColorPreviewMouseUp
This commit is contained in:
parent
e8bebc065b
commit
d90342a070
@ -538,17 +538,10 @@ begin
|
|||||||
ColorPreview.GetHighlighterAttriAtRowCol(XY, Token, Attri);
|
ColorPreview.GetHighlighterAttriAtRowCol(XY, Token, Attri);
|
||||||
if Attri = nil then
|
if Attri = nil then
|
||||||
Attri := FCurrentHighlighter.WhitespaceAttribute;
|
Attri := FCurrentHighlighter.WhitespaceAttribute;
|
||||||
if Attri <> nil then begin
|
|
||||||
NewNode := ColorElementTree.Items.GetFirstNode;
|
if Attri <> nil then
|
||||||
while Assigned(NewNode) do begin
|
begin
|
||||||
if (NewNode.Data <> nil)
|
SelectNamedColor(Attri.StoredName);
|
||||||
and (TColorSchemeAttribute(NewNode.Data).StoredName = Attri.StoredName) then
|
|
||||||
break;
|
|
||||||
NewNode := NewNode.GetNext;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if NewNode <> nil then begin
|
|
||||||
NewNode.Selected := True;
|
|
||||||
FindCurHighlightElement;
|
FindCurHighlightElement;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user