mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 13:20:26 +02:00
ObjectInspector: Reduce calls to ComponentTree.Invalidate (changing the positon of FCurrentButton or FCurrentEdit in the OI-Grid can trigger a call to Resize of the Form, even so the Size did not change / Win10)
git-svn-id: trunk@59622 -
This commit is contained in:
parent
a08b455ead
commit
8765ceb4f1
@ -701,6 +701,8 @@ type
|
||||
FOnShowOptions: TNotifyEvent;
|
||||
FOnUpdateRestricted: TNotifyEvent;
|
||||
FOnViewRestricted: TNotifyEvent;
|
||||
FLastTreeSize: TRect;
|
||||
|
||||
// These event handlers are assigned at run-time, no need for default published section.
|
||||
procedure ComponentTreeDblClick(Sender: TObject);
|
||||
procedure ComponentTreeGetNodeImageIndex(APersistent: TPersistent; var AIndex: integer);
|
||||
@ -5616,8 +5618,11 @@ end;
|
||||
procedure TObjectInspectorDlg.Resize;
|
||||
begin
|
||||
inherited Resize;
|
||||
if Assigned(ComponentTree) then
|
||||
// BUG: resize gets called, even if nothing changed
|
||||
if Assigned(ComponentTree) and (FLastTreeSize <> ComponentTree.BoundsRect) then begin
|
||||
ComponentTree.Invalidate; // Update Scrollbars.
|
||||
FLastTreeSize := ComponentTree.BoundsRect;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TObjectInspectorDlg.ComponentTreeModified(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user