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:
ondrej 2015-12-23 13:41:44 +00:00
parent 775dee256f
commit 874f07c4da
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;