mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 23:59:27 +02:00
designer: revert 21609 #88641be03d since tDesignercanvas does not supports embedded save/restore
git-svn-id: trunk@21612 -
This commit is contained in:
parent
fd061442cc
commit
20cb5e028d
@ -2501,9 +2501,8 @@ var
|
||||
Diff, ItemLeftTop: TPoint;
|
||||
IconRect, TextRect: TRect;
|
||||
TextSize: TSize;
|
||||
IsSelected, IsSaved: Boolean;
|
||||
IsSelected: Boolean;
|
||||
begin
|
||||
IsSaved := False;
|
||||
for i := 0 to FLookupRoot.ComponentCount - 1 do
|
||||
begin
|
||||
AComponent := FLookupRoot.Components[i];
|
||||
@ -2517,18 +2516,12 @@ begin
|
||||
ItemTop := ItemLeftTop.Y - Diff.Y;
|
||||
ItemRight := ItemLeft + NonVisualCompWidth;
|
||||
ItemBottom := ItemTop + NonVisualCompWidth;
|
||||
|
||||
if not IsSaved then
|
||||
begin
|
||||
aDDC.Save;
|
||||
IsSaved := True;
|
||||
end;
|
||||
|
||||
if not aDDC.RectVisible(ItemLeft, ItemTop, ItemRight, ItemBottom) then
|
||||
Continue;
|
||||
|
||||
IsSelected := ControlSelection.IsSelected(AComponent);
|
||||
with aDDC.Canvas do
|
||||
aDDC.Save;
|
||||
with aDDC.Canvas do
|
||||
begin
|
||||
// draw component frame
|
||||
Pen.Width := 1;
|
||||
@ -2568,11 +2561,9 @@ begin
|
||||
if (ControlSelection.Count > 1) and IsSelected then
|
||||
ControlSelection.DrawMarkerAt(aDDC,
|
||||
ItemLeft, ItemTop, NonVisualCompWidth, NonVisualCompWidth);
|
||||
aDDC.Restore;
|
||||
end;
|
||||
end;
|
||||
|
||||
if IsSaved then
|
||||
aDDC.Restore;
|
||||
end;
|
||||
|
||||
procedure TDesigner.DrawDesignerItems(OnlyIfNeeded: boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user