mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 03:48:08 +02:00
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:
parent
f3a9a4ddf2
commit
c91d201731
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user