designer: unify menu editor PopupParent/PopupMode code with r51051 #175c0031c0

git-svn-id: trunk@51052 -
This commit is contained in:
ondrej 2015-12-27 13:23:11 +00:00
parent 175c0031c0
commit bcca492fd6
2 changed files with 3 additions and 7 deletions

View File

@ -13,7 +13,7 @@ object MenuDesigner: TMenuDesigner
OnDestroy = FormDestroy
Position = poScreenCenter
ShowHint = True
LCLVersion = '1.4.4.0'
LCLVersion = '1.7'
object LeftPanel: TPanel
Left = 0
Height = 345

View File

@ -28,7 +28,7 @@ interface
uses
Buttons, Classes, ComponentEditors, Controls, ExtCtrls, Forms,
Graphics, LazarusIDEStrConsts, LazIDEIntf, LCLintf, LCLProc, Menus,
MenuShadows, PropEdits, StdCtrls, SysUtils, FormEditingIntf;
MenuShadows, PropEdits, StdCtrls, SysUtils, FormEditingIntf, IDEWindowIntf;
type
@ -143,11 +143,7 @@ begin
if (aMenu = nil) then
RaiseGDBException(lisMenuEditorShowMenuEditorTMenuParameterIsNil);
MenuDesigner.SetMenu(aMenu, nil);
MenuDesigner.PopupParent:=GetParentForm(FormEditingHook.GetCurrentObjectInspector, True);
if MenuDesigner.PopupParent<>nil then
MenuDesigner.PopupMode:=pmExplicit
else
MenuDesigner.PopupMode:=pmNone;
SetPopupModeParentForPropertyEditor(MenuDesigner);
MenuDesigner.ShowOnTop;
end;