X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/293987e80c5be7aa499e2a3467bc5b57a0a43648..07aaf32633ecf18ec3edfbb41793a112914792d0:/src/generic/vlbox.cpp?ds=inline diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index a80cc97e13..a4be49817c 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -6,7 +6,7 @@ // Created: 31.05.03 // RCS-ID: $Id$ // Copyright: (c) 2003 Vadim Zeitlin -// License: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -249,7 +249,10 @@ bool wxVListBox::DoSetCurrent(int current) { // it is, indeed, only partly visible, so scroll it into view to // make it entirely visible + // BUT scrolling down when m_current is first visible makes it + // completely hidden, so that is even worse while ( (size_t)m_current + 1 == GetVisibleRowsEnd() && + (size_t)m_current != GetVisibleRowsBegin() && ScrollToRow(GetVisibleBegin() + 1) ) ; // but in any case refresh it as even if it was only partly visible