From fde8db1e3576022ad88ea042aa2591f5e809237e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 20 May 2014 17:03:11 +0200 Subject: [PATCH] 2014-05-20 17:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/debug/debugger.prg ! calculate ListBox coordinates as integer value (it fixes RTE reported by Rolf in SWITCH statement) * src/debug/dbghelp.prg ! fixed number of help pages calculation --- ChangeLog.txt | 8 ++++++++ src/debug/dbghelp.prg | 8 ++------ src/debug/debugger.prg | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index b497e979da..35b3a42924 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,14 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-05-20 17:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/debug/debugger.prg + ! calculate ListBox coordinates as integer value + (it fixes RTE reported by Rolf in SWITCH statement) + + * src/debug/dbghelp.prg + ! fixed number of help pages calculation + 2014-05-06 17:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/cdpapi.c * src/rtl/iousr.c diff --git a/src/debug/dbghelp.prg b/src/debug/dbghelp.prg index 6569115745..3e741f80dd 100644 --- a/src/debug/dbghelp.prg +++ b/src/debug/dbghelp.prg @@ -175,15 +175,11 @@ STATIC PROCEDURE ShowTopic( oDlg, aTopics, nTopic, nPageOp ) LOCAL oDebug := __Dbg() LOCAL nRows := oDlg:nBottom - oDlg:nTop - 1 - LOCAL nPages := Len( aTopics[ nTopic ][ 2 ] ) / nRows + LOCAL nPages := Int( ( Len( aTopics[ nTopic ][ 2 ] ) + nRows - 1 ) / nRows ) LOCAL nRowsToPaint LOCAL n - IF nPages > 1 .AND. Int( nPages ) < nPages - nPages := Int( nPages ) + 1 - ENDIF - - IF nPages == 1 + IF nPages <= 1 IF nPageOp == -1 .OR. nPageOp == 1 RETURN ENDIF diff --git a/src/debug/debugger.prg b/src/debug/debugger.prg index b1e374c4cd..f2c125323a 100644 --- a/src/debug/debugger.prg +++ b/src/debug/debugger.prg @@ -1893,10 +1893,10 @@ METHOD ListBox( cCaption, aItems ) CLASS HBDebugger AEval( aItems, {| x | nMaxWid := Max( Len( x ), nMaxWid ) } ) nMaxWid += 2 - nTop := ( ::nMaxRow / 2 ) - Min( nItems, ::nMaxRow - 5 ) / 2 - nBottom := ( ::nMaxRow / 2 ) + Min( nItems, ::nMaxRow - 5 ) / 2 + 1 - nLeft := ( ::nMaxCol / 2 ) - Min( nMaxWid, ::nMaxCol * 3 / 2 ) / 2 - nRight := ( ::nMaxCol / 2 ) + Min( nMaxWid, ::nMaxCol * 3 / 2 ) / 2 + nTop := Int( ( ::nMaxRow / 2 ) - Min( nItems, ::nMaxRow - 5 ) / 2 ) + nBottom := Int( ( ::nMaxRow / 2 ) + Min( nItems, ::nMaxRow - 5 ) / 2 + 1 ) + nLeft := Int( ( ::nMaxCol / 2 ) - Min( nMaxWid, ::nMaxCol * 3 / 2 ) / 2 ) + nRight := Int( ( ::nMaxCol / 2 ) + Min( nMaxWid, ::nMaxCol * 3 / 2 ) / 2 ) oWndList := HBDbWindow():new( nTop, nLeft, nBottom, nRight, cCaption, ; ::oPullDown:cClrPopup ) oWndList:lShadow := .T.