diff options
author | Malte Timmermann <mt@openoffice.org> | 2001-10-09 12:56:47 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2001-10-09 12:56:47 +0000 |
commit | debc3e716ea8a4b96ce591a8828a9d36ff756d19 (patch) | |
tree | d9b7ce2c95b7d4bc9352552d90012e8672f2b382 /vcl | |
parent | 016e93827039f1cc99160390c37c02952b4fd4ae (diff) |
#92228# ScrollMenues, LastVisibleEntry...
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/menu.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 366679c5f219..3715ee0666fe 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2,9 +2,9 @@ * * $RCSfile: menu.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: mt $ $Date: 2001-08-21 16:19:18 $ + * last change: $Author: mt $ $Date: 2001-10-09 13:56:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2633,7 +2633,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp ) long nHeight = GetOutputSizePixel().Height(); USHORT nLastVisible; - USHORT nVisible = ((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible ); + ((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible ); if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID ) { bScrollDown = FALSE; @@ -2792,8 +2792,13 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp ) ImplScroll( TRUE ); Size aOutSz = GetOutputSizePixel(); - while ( n >= ( nFirstEntry + ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry ) ) ) + USHORT nLastVisible; + ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); + while ( n > nLastVisible ) + { ImplScroll( FALSE ); + ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); + } } ChangeHighlightItem( n, FALSE ); break; |