diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 195d732a37..ca2e8dc85f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-02-09 23:46 GMT+1 Maurilio Longo + * source/rtl/tbrowse.prg + ! fixed ::Moved() method which was calling ::Dehilite() even if TBrowse was already + unstable causing wrong painting of current row + 2001-02-09 11:25 UTC-0800 Ron Pinkas * harbour/source/debug/debugger.prg ! Fixesd ValType( &cColor ) to Type( cColor ) diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index 883d955987..288a71acfa 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -801,6 +801,9 @@ METHOD Stabilize() CLASS TBrowse if (::nNewRowPos + nRecsSkipped >= 1) .AND. (::nNewRowPos + nRecsSkipped <= ::RowCount) ::nNewRowPos += nRecsSkipped ::nLastRetrieved := ::nNewRowPos + // This is needed since present TBrowse has no cache, so I need to repaint current row + // rereading it from data source and to force rereading from data source I have to mark + // row as invalid ::aRedraw[::nNewRowPos] := .T. else @@ -980,12 +983,15 @@ return .F. // Movement keys cause TBrowse to become unstable. METHOD Moved() CLASS TBrowse - // Internal flags used to set ::HitTop/Bottom during next stabilization - ::lHitTop := .F. - ::lHitBottom := .F. + // No need to Dehilite() current cell more than once + if ::stable + // Internal flags used to set ::HitTop/Bottom during next stabilization + ::lHitTop := .F. + ::lHitBottom := .F. - ::DeHilite() - ::stable := .F. + ::DeHilite() + ::stable := .F. + endif return Self