From 0e49b0dfcd4143988b7c5cd6094f821b709e36bd Mon Sep 17 00:00:00 2001 From: graemeg Date: Thu, 20 Mar 2008 12:06:24 +0000 Subject: * Finally fixed the Windows bug in the UI Designer when you move components quickly in the design form. * Undone some changes I accidentily checked in in revision 634 regarding the newformdesigner.pas unit. --- src/corelib/gdi/gfx_gdi.pas | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index a1358b4b..d77c27c6 100644 --- a/src/corelib/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas @@ -664,9 +664,14 @@ begin {$IFDEF DEBUG} writeln('fpGFX/GDI:', w.ClassName + ': MouseButtonDown event'); {$ENDIF} + // This is temporary and we should try and move it to + // the UI Designer code instead. + if (uMsg = WM_LBUTTONDOWN) and (w is TfpgWidget) then + begin + if TfpgWidget(w).FormDesigner <> nil then + w.CaptureMouse; + end; mcode := FPGM_MOUSEDOWN; -// if PopupListFirst = nil then -// SetCapture(w.WinHandle); end; WM_LBUTTONUP, @@ -676,12 +681,15 @@ begin {$IFDEF DEBUG} writeln('fpGFX/GDI:', w.ClassName + ': MouseButtonUp event'); {$ENDIF} + // This is temporary and we should try and move it to + // the UI Designer code instead. + if (uMsg = WM_LBUTTONUP) and (w is TfpgWidget) then + begin + if TfpgWidget(w).FormDesigner <> nil then + w.ReleaseMouse; + end; mcode := FPGM_MOUSEUP; -// if PopupListFirst = nil then -// ReleaseCapture; end; - //WM_LBUTTONDBLCLK: - //mcode := FPGM_DOUBLECLICK; else mcode := 0; end; -- cgit v1.2.3-70-g09d2