mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +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);
|
||||
if Attri = nil then
|
||||
Attri := FCurrentHighlighter.WhitespaceAttribute;
|
||||
if Attri <> nil then begin
|
||||
NewNode := ColorElementTree.Items.GetFirstNode;
|
||||
while Assigned(NewNode) do begin
|
||||
if (NewNode.Data <> nil)
|
||||
and (TColorSchemeAttribute(NewNode.Data).StoredName = Attri.StoredName) then
|
||||
break;
|
||||
NewNode := NewNode.GetNext;
|
||||
end;
|
||||
end;
|
||||
if NewNode <> nil then begin
|
||||
NewNode.Selected := True;
|
||||
|
||||
if Attri <> nil then
|
||||
begin
|
||||
SelectNamedColor(Attri.StoredName);
|
||||
FindCurHighlightElement;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user