mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 05:37:30 +01:00
designer: menudesigner: set PopupMode and PopupParent to ObjectInspector (or its parent form in case of docked environment). Remove fsStayOnTop as it is buggy
git-svn-id: trunk@51008 -
This commit is contained in:
parent
775dee256f
commit
874f07c4da
@ -8,7 +8,6 @@ object MenuDesigner: TMenuDesigner
|
||||
ClientWidth = 730
|
||||
Constraints.MinHeight = 345
|
||||
Constraints.MinWidth = 730
|
||||
FormStyle = fsStayOnTop
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
|
||||
@ -28,7 +28,7 @@ interface
|
||||
uses
|
||||
Buttons, Classes, ComponentEditors, Controls, ExtCtrls, Forms,
|
||||
Graphics, LazarusIDEStrConsts, LazIDEIntf, LCLintf, LCLProc, Menus,
|
||||
MenuShadows, PropEdits, StdCtrls, SysUtils;
|
||||
MenuShadows, PropEdits, StdCtrls, SysUtils, FormEditingIntf;
|
||||
|
||||
type
|
||||
|
||||
@ -143,6 +143,11 @@ 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;
|
||||
MenuDesigner.ShowOnTop;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user