added support for modal widget

This commit is contained in:
Basile Burg 2015-02-23 06:20:53 +01:00
parent 6df102dac4
commit 10aa04e96a
1 changed files with 12 additions and 7 deletions

View File

@ -1403,13 +1403,18 @@ begin
if widg = nil then exit; if widg = nil then exit;
// //
if widg.isDockable then if widg.isDockable then
win := DockMaster.GetAnchorSite(widg) begin
else win := DockMaster.GetAnchorSite(widg);
win := widg; win.Show;
// win.BringToFront;
if win = nil then exit; end
win.Show; else begin
win.BringToFront; if widg.isModal then widg.ShowModal else
begin
widg.Show;
widg.BringToFront;
end;
end;
end; end;
procedure TCEMainForm.layoutLoadFromFile(const aFilename: string); procedure TCEMainForm.layoutLoadFromFile(const aFilename: string);