Commit 9aefaf53 authored by Mattias Gaertner's avatar Mattias Gaertner 🙃
Browse files

IDE: menu designer: do not call ProcessMessages

git-svn-id: trunk@54863 -
parent a2f6765c
......@@ -1336,7 +1336,7 @@ end;
procedure TShadowMenu.RefreshFakes;
begin
Application.ProcessMessages;
// MG: Dont: Application.ProcessMessages; this might free components and trigger events
FAddItemFake.Refresh;
FAddSubmenuFake.Refresh;
FAddFirstItemFake.Refresh;
......@@ -1551,7 +1551,7 @@ begin
CreateShadowBoxesAndItems;
UpdateBoxLocationsAndSizes;
HideBoxesAboveLevel(0);
Application.ProcessMessages;
// MG: Dont: Application.ProcessMessages; this might free components and trigger events
FInitialising:=True;
if (FInitialSelectedMenuItem <> nil) then begin
SetSelectedMenuItem(FInitialSelectedMenuItem, True, False);
......@@ -1635,12 +1635,15 @@ begin
selectedShadow.ShowChildBox;
UpdateSelectedItemInfo;
if not viaDesigner then
if not viaDesigner then begin
//debugln(['TShadowMenu.SetSelectedShadow ',DbgSName(curSelectedItem)]);
FEditorDesigner.SelectOnlyThisComponent(curSelectedItem);
end;
if not FDesigner.FGui.Visible then
FDesigner.FGui.ShowOnTop;
selectedShadow.SetFocus;
if selectedShadow<>nil then
selectedShadow.SetFocus;
UpdateActionsEnabledness;
RefreshFakes;
end;
......
......@@ -285,7 +285,10 @@ begin
if FUpdateCount > 0 then
Exit; // This event will be executed after all updates, look at EndUpdate
//debugln(['TMenuDesignerForm.OnDesignerSetSelection: ']);
//ASelection.WriteDebugReport;
persist:=GetSelectedMenuComponent(ASelection, isTMenu, isTMenuItem);
//debugln(['TMenuDesignerForm.OnDesignerSetSelection isTMenu=',isTMenu,' isTMenuItem=',isTMenuItem,' persist=',DbgSName(persist)]);
if (persist <> nil) then
begin
if isTMenu then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment