marge r51051 #175c0031c0: ideintf: set PopupMode/PopupParent for collection editor and actions editor. Issue #24711

git-svn-id: branches/fixes_1_6@51055 -
This commit is contained in:
ondrej 2015-12-27 20:15:38 +00:00
parent f3a9a4ddf2
commit c91d201731
3 changed files with 14 additions and 2 deletions

View File

@ -27,7 +27,7 @@ uses
Classes, SysUtils, LCLProc, Forms, Controls, Dialogs,
ActnList, ExtCtrls, Buttons, StdCtrls, ObjInspStrConsts,
ComponentEditors, PropEdits, PropEditUtils, DBActns, StdActns, LCLIntf,
LCLType, Graphics, Menus, ComCtrls, contnrs;
LCLType, Graphics, Menus, ComCtrls, contnrs, IDEWindowIntf;
type
TActStdPropItem = class;
@ -1076,6 +1076,7 @@ begin
SetActionList(AActionList);
end;
end;
SetPopupModeParentForPropertyEditor(AEditor);
AEditor.ShowOnTop;
end;

View File

@ -504,6 +504,8 @@ procedure MakeIDEWindowDockSite(AForm: TCustomForm);
procedure CloseAllForms;
function IDEWindowsGlobalOptions: TIDEWindowsGlobalOptions;
procedure SetPopupModeParentForPropertyEditor(const AEditorDlg: TCustomForm);
procedure Register;
implementation
@ -514,6 +516,14 @@ uses
var
FIDEWindowsGlobalOptions: TIDEWindowsGlobalOptions = nil;
procedure SetPopupModeParentForPropertyEditor(const AEditorDlg: TCustomForm);
begin
if IDEDockMaster<>nil then
AEditorDlg.PopupParent:=LazarusIDE.GetMainBar// sets PopupMode:=pmExplicit automatically
else
AEditorDlg.PopupMode:=pmNone;
end;
function StrToIDEWindowPlacement(const s: string): TIDEWindowPlacement;
begin
for Result:=Low(TIDEWindowPlacement) to High(TIDEWindowPlacement) do

View File

@ -30,7 +30,7 @@ uses
FileUtil, FileCtrl, ObjInspStrConsts, PropEditUtils, Themes,
// Forms with .lfm files
FrmSelectProps, StringsPropEditDlg, KeyValPropEditDlg, CollectionPropEditForm,
FileFilterPropEditor;
FileFilterPropEditor, IDEWindowIntf;
const
MaxIdentLength: Byte = 63;
@ -4160,6 +4160,7 @@ begin
if CollectionForm = nil then
CollectionForm := TCollectionPropertyEditorForm.Create(Application);
CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName);
SetPopupModeParentForPropertyEditor(CollectionForm);
CollectionForm.EnsureVisible;
Result:=CollectionForm;
end;