MG: repaints reduced

git-svn-id: trunk@320 -
This commit is contained in:
lazarus 2001-07-10 13:25:49 +00:00
parent 78023a3cfd
commit 22be600ffb
2 changed files with 16 additions and 8 deletions

View File

@ -348,7 +348,9 @@ begin
CurrentString := Copy(CurrentString, 1, Length(CurrentString) - 1);
end;
end;
Paint;
{$ifdef SYN_LAZARUS}
Invalidate;
{$ENDIF}
end;
procedure TSynBaseCompletionForm.KeyPress(var Key: char);
@ -364,7 +366,9 @@ begin
else if Assigned(OnCancel) then
OnCancel(Self);
end; // case
Paint;
{$ifdef SYN_LAZARUS}
Invalidate;
{$ENDIF}
end;
procedure TSynBaseCompletionForm.MouseDown(Button: TMouseButton;
@ -394,7 +398,9 @@ begin
Scroll.Max := 0
else
Scroll.Max := ItemList.Count - NbLinesInWindow;
{$IFNDEF SYN_LAZARUS}
Position := Position;
{$ENDIF}
Scroll.LargeChange := NbLinesInWindow;
// draw a rectangle around the window
@ -418,7 +424,7 @@ begin
Canvas.Rectangle(0, FFontHeight * i, width, FFontHeight * (i + 1));
Canvas.Pen.Color := clBlack;
Canvas.Font.Color := clWhite;
Hint := ItemList[Scroll.Position + i];
Hint := ItemList[Position];
end
else
Begin
@ -445,7 +451,8 @@ begin
Position := Scroll.Position
else if Position > Scroll.Position + NbLinesInWindow - 1 then
Position := Scroll.Position + NbLinesInWindow - 1;
Paint;
writeln('TSynBaseCompletionForm.ScrollChange');
Invalidate;
end;
procedure TSynBaseCompletionForm.ScrollGetFocus(Sender: TObject);
@ -539,7 +546,7 @@ begin
Scroll.Position := Position
else if Scroll.Position < Position - NbLinesInWindow + 1 then
Scroll.Position := Position - NbLinesInWindow + 1;
invalidate;
Invalidate;
end;
end;
end;

View File

@ -251,8 +251,9 @@ begin
Include(FControlState, csCustomPaint);
try
ControlState := ControlState + [csCustomPaint];
inherited WMPaint(Message);
Paint; // TODO: move this to the PaintWindow function;
ControlState := ControlState - [csCustomPaint];
finally
Exclude(FControlState, csCustomPaint);
end;
@ -938,8 +939,8 @@ end;
{ =============================================================================
$Log$
Revision 1.23 2001/07/06 06:25:37 lazarus
MG: fixes for ide speedbuttons, form.showmodal, initial lazarus.dci
Revision 1.24 2001/07/10 13:25:49 lazarus
MG: repaints reduced
Revision 1.22 2001/06/28 18:15:03 lazarus
MG: bugfixes for destroying controls