From d0b6f28e846cfad30a115ce593003ea7d93c814f Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Mon, 15 Jan 2007 13:38:40 +0000 Subject: [PATCH] INTEGRATION: CWS dba22b (1.57.114); FILE MERGED 2006/12/09 18:56:42 fs 1.57.114.1: #i68720# KeyInput: for quick search, also select if newly selected entry is current entry (but not if it already is selected) --- vcl/source/control/ilstbox.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 0b0f71ff895e..ff10f4f55198 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -4,9 +4,9 @@ * * $RCSfile: ilstbox.cxx,v $ * - * $Revision: 1.57 $ + * $Revision: 1.58 $ * - * last change: $Author: obo $ $Date: 2006-09-17 11:53:34 $ + * last change: $Author: vg $ $Date: 2007-01-15 14:38:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1577,7 +1577,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) else if( nSelect >= (mnTop + mnMaxVisibleEntries) ) SetTopEntry( nSelect - mnMaxVisibleEntries + 1 ); - if ( nSelect == mnCurrentPos ) + if ( mpEntryList->IsEntryPosSelected( nSelect ) ) nSelect = LISTBOX_ENTRY_NOTFOUND; maSearchTimeout.Start(); @@ -1589,10 +1589,13 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) } } - if ( (nSelect != LISTBOX_ENTRY_NOTFOUND) && - ((nSelect != mnCurrentPos ) || ( eLET == LET_KEYSPACE)) ) + if ( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) + && ( ( !mpEntryList->IsEntryPosSelected( nSelect ) ) + || ( eLET == LET_KEYSPACE ) + ) + ) { - DBG_ASSERT( (nSelect != mnCurrentPos) || mbMulti, "ImplListBox: Selecting same Entry" ); + DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" ); if( nSelect >= mpEntryList->GetEntryCount() ) nSelect = mpEntryList->GetEntryCount()-1; mnCurrentPos = nSelect;