From cf2ba4e5e0ff0ed49b4f1271c8acc27cbde4ee2e Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 1 Oct 2010 12:32:43 +0200 Subject: bugfix: SpinEdit sometimes caused an AV because fpgCaret could not paint --- src/corelib/fpg_main.pas | 1 + src/gui/fpg_spinedit.pas | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index fa6b44d5..faaad5fd 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -2215,6 +2215,7 @@ procedure TfpgCaret.UnSetCaret(ACanvas: TfpgCanvas); begin if (FCanvas = ACanvas) or (ACanvas = nil) then begin + FTimer.Enabled := False; FEnabled := False; FCanvas := nil; end; diff --git a/src/gui/fpg_spinedit.pas b/src/gui/fpg_spinedit.pas index ce768120..52bd7873 100644 --- a/src/gui/fpg_spinedit.pas +++ b/src/gui/fpg_spinedit.pas @@ -327,10 +327,7 @@ end; procedure TfpgAbstractSpinEdit.HandlePaint; begin - Canvas.Clear(BackgroundColor); - if FButtonUp.HasHandle then - fpgPostMessage(self, FButtonUp, FPGM_PAINT); -// FButtonDown.Invalidate; + Canvas.Clear(BackgroundColor); end; procedure TfpgAbstractSpinEdit.HandleResize(AWidth, AHeight: TfpgCoord); -- cgit v1.2.3-70-g09d2