MG: fixed speedbutton in designmode

git-svn-id: trunk@3246 -
This commit is contained in:
lazarus 2002-08-26 17:28:21 +00:00
parent 081843bc87
commit ad27a83fd6
2 changed files with 6 additions and 2 deletions

View File

@ -1445,7 +1445,7 @@ var OldBrushColor:TColor;
SaveIndex: integer;
// OldFormHandle: HDC;
begin
if (Count=0) or (FCustomForm=nil) or Items[0].IsTopLvl then exit;
if (Count=0) or (FCustomForm=nil) or Items[0].IsTopLvl or (DC=0) then exit;
GetWindowOrgEx(DC, DCOrigin);
FormOrigin:=FCustomForm.ClientOrigin;
Diff.X:=FormOrigin.X-DCOrigin.X;
@ -1517,6 +1517,7 @@ begin
ATop:=AControlOrigin.Y-DCOrigin.Y;
SaveIndex := SaveDC(DC);
FCanvas.Handle:=DC;
{
writeln('DrawMarker A ',FCustomForm.Name

View File

@ -55,7 +55,7 @@ end;
procedure TGraphicControl.WMPaint(var Message: TLMPaint);
begin
// tspeedbutton is buggy: this is a workaround
if lowercase(Classname)='tspeedbutton' then begin
if AnsiCompareText(Classname,'tspeedbutton')=0 then begin
Paint;
exit;
end;
@ -92,6 +92,9 @@ end;
{ =============================================================================
$Log$
Revision 1.4 2002/08/26 17:28:21 lazarus
MG: fixed speedbutton in designmode
Revision 1.3 2002/05/10 06:05:52 lazarus
MG: changed license to LGPL