diff options
Diffstat (limited to 'vcl/source/window/accmgr.cxx')
-rw-r--r-- | vcl/source/window/accmgr.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 71373bbabee5..36064fc8bc6b 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -83,6 +83,23 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel ) if ( !mpAccelList ) return; + //e.g. #i90599#. Someone starts typing a sequence in a dialog, but doesn't + //end it, and then closes the dialog, deleting the accelerators. So if + //we're removing an accelerator that a sub-accelerator which is in the + //sequence list, throw away the entire sequence + if ( mpSequenceList ) + { + for (USHORT i = 0; i < pAccel->GetItemCount(); ++i) + { + Accelerator* pSubAccel = pAccel->GetAccel(pAccel->GetItemId(i)); + if ( mpSequenceList->GetPos( pSubAccel ) != LIST_ENTRY_NOTFOUND ) + { + EndSequence( true ); + break; + } + } + } + // Raus damit mpAccelList->Remove( pAccel ); } |