mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-27 23:29:39 +02:00
IDE: menu designer: prevent crash when all menu items were deleted, bug #23870
git-svn-id: trunk@40241 -
This commit is contained in:
parent
5ee38f3ce4
commit
c026b52cc5
@ -960,9 +960,12 @@ begin
|
||||
Item := FindDesignerMenuItem(MenuItem);
|
||||
if Item <> nil then
|
||||
begin
|
||||
DeleteItem(Item);
|
||||
SetCoordinates(POSITION_LEFT, POSITION_TOP, 0, Root);
|
||||
RealignDesigner;
|
||||
if DeleteItem(Item) = 2 then
|
||||
(Owner as TForm).Close
|
||||
else begin
|
||||
SetCoordinates(POSITION_LEFT, POSITION_TOP, 0, Root);
|
||||
RealignDesigner;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
inherited;
|
||||
|
Loading…
Reference in New Issue
Block a user