dont use direct call of TControl.DoEndDock from DockPerformer (hint from Marius)

git-svn-id: trunk@13971 -
This commit is contained in:
paul 2008-02-04 02:39:25 +00:00
parent 49c34c5cb4
commit 543e960d76
4 changed files with 8 additions and 3 deletions

View File

@ -400,6 +400,7 @@ type
protected
procedure AdjustDockRect(ARect: TRect); virtual;
function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; override;
procedure EndDrag(Target: TObject; X, Y: Integer); override;
public
property DockRect: TRect read FDockRect write FDockRect;
property DropAlign: TAlign read FDropAlign write FDropAlign;

View File

@ -536,7 +536,7 @@ begin
if not Accepted then
ADockObjectCopy.Control.DragCanceled;
ADockObjectCopy.Control.DoEndDock(ADockObjectCopy.DragTarget,TargetPos.X,TargetPos.Y);
ADockObjectCopy.EndDrag(ADockObjectCopy.DragTarget,TargetPos.X,TargetPos.Y);
finally
if FDragObjectAutoFree then
ADockObjectCopy.Free

View File

@ -99,6 +99,12 @@ begin
Result := crDefault;
end;
procedure TDragDockObject.EndDrag(Target: TObject; X, Y: Integer);
begin
if FControl <> nil then
FControl.DoEndDock(Target, X, Y);
end;
// included by controls.pp

View File

@ -363,8 +363,6 @@ end;
class procedure TWin32WSStatusBar.GetPreferredSize(const AWinControl: TWinControl;
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
var
R: TRect;
begin
if (PreferredStatusBarHeight=0) then
InitializePreferredStatusBarHeight;