Revisión de TCustomEditor.UpdateActions para tratar de solucionar el alto consumo de CPU
git-svn-id: https://192.168.0.254/svn/Componentes.Internos.GUISDK/trunk@23 e3f7d858-3362-1a4e-b49c-1b1bd96e4488
This commit is contained in:
parent
95a3799962
commit
31b180cadf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -49,25 +49,14 @@
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\Source\uGUIRegister.pas" />
|
||||
<DCCReference Include="designide.dcp" />
|
||||
<DCCReference Include="G.dcp" />
|
||||
<DCCReference Include="GU.dcp" />
|
||||
<DCCReference Include="GUI.dcp" />
|
||||
<DCCReference Include="GUIS.dcp" />
|
||||
<DCCReference Include="GUISD.dcp" />
|
||||
<DCCReference Include="GUISDJ.dcp" />
|
||||
<DCCReference Include="GUISDK.dcp" />
|
||||
<DCCReference Include="GUISDK_.dcp" />
|
||||
<DCCReference Include="GUISDK_D.dcp" />
|
||||
<DCCReference Include="GUISDK_D1.dcp" />
|
||||
<DCCReference Include="GUISDK_D11.dcp" />
|
||||
<DCCReference Include="GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="rtl.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=6011
|
||||
EurekaLog Version=6006
|
||||
Activate=0
|
||||
Activate Handle=1
|
||||
Save Log File=1
|
||||
|
||||
@ -280,7 +280,25 @@ procedure TCustomEditor.UpdateActions;
|
||||
var
|
||||
I: Integer;
|
||||
|
||||
{ Copiado de http://stackoverflow.com/questions/10127685/how-can-i-use-an-action-to-determine-a-controls-visibility }
|
||||
procedure TraverseClients(Container: TWinControl);
|
||||
var
|
||||
I: Integer;
|
||||
Control: TControl;
|
||||
begin
|
||||
Application.ProcessMessages; // <--- Modificación
|
||||
if Container.Showing and not (csDesigning in Container.ComponentState) then
|
||||
for I := 0 to Container.ControlCount - 1 do
|
||||
begin
|
||||
Control := Container.Controls[I];
|
||||
if (csActionClient in Control.ControlStyle) and Control.Visible then
|
||||
Control.InitiateAction;
|
||||
if (Control is TWinControl) and (TWinControl(Control).ControlCount > 0) then
|
||||
TraverseClients(TWinControl(Control));
|
||||
end;
|
||||
end;
|
||||
|
||||
{procedure TraverseClients(Container: TWinControl);
|
||||
var
|
||||
I: Integer;
|
||||
Control: TControl;
|
||||
@ -299,14 +317,14 @@ var
|
||||
TraverseClients(TWinControl(Control));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;}
|
||||
|
||||
begin
|
||||
if (csDesigning in ComponentState) or not Showing then Exit;
|
||||
{ Update form }
|
||||
InitiateAction;
|
||||
{ Update main menu's top-most items }
|
||||
if Menu <> nil then
|
||||
if (Assigned(Menu) and Assigned(Menu.Items)) then
|
||||
for I := 0 to Menu.Items.Count - 1 do
|
||||
with Menu.Items[I] do
|
||||
if Visible then InitiateAction;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user