mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 16:27:26 +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
|
ClientWidth = 730
|
||||||
Constraints.MinHeight = 345
|
Constraints.MinHeight = 345
|
||||||
Constraints.MinWidth = 730
|
Constraints.MinWidth = 730
|
||||||
FormStyle = fsStayOnTop
|
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
|
|||||||
@ -28,7 +28,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Buttons, Classes, ComponentEditors, Controls, ExtCtrls, Forms,
|
Buttons, Classes, ComponentEditors, Controls, ExtCtrls, Forms,
|
||||||
Graphics, LazarusIDEStrConsts, LazIDEIntf, LCLintf, LCLProc, Menus,
|
Graphics, LazarusIDEStrConsts, LazIDEIntf, LCLintf, LCLProc, Menus,
|
||||||
MenuShadows, PropEdits, StdCtrls, SysUtils;
|
MenuShadows, PropEdits, StdCtrls, SysUtils, FormEditingIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -143,6 +143,11 @@ begin
|
|||||||
if (aMenu = nil) then
|
if (aMenu = nil) then
|
||||||
RaiseGDBException(lisMenuEditorShowMenuEditorTMenuParameterIsNil);
|
RaiseGDBException(lisMenuEditorShowMenuEditorTMenuParameterIsNil);
|
||||||
MenuDesigner.SetMenu(aMenu, nil);
|
MenuDesigner.SetMenu(aMenu, nil);
|
||||||
|
MenuDesigner.PopupParent:=GetParentForm(FormEditingHook.GetCurrentObjectInspector, True);
|
||||||
|
if MenuDesigner.PopupParent<>nil then
|
||||||
|
MenuDesigner.PopupMode:=pmExplicit
|
||||||
|
else
|
||||||
|
MenuDesigner.PopupMode:=pmNone;
|
||||||
MenuDesigner.ShowOnTop;
|
MenuDesigner.ShowOnTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user