summaryrefslogtreecommitdiff
path: root/vcl/source/window/accmgr.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-29 18:25:35 +0100
committerPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-29 18:25:35 +0100
commit979028e7efbcaf1b419040d9bd9df34218b3fca2 (patch)
tree6481bf59531d0dc86b75f74ef05c8902b393ba7c /vcl/source/window/accmgr.cxx
parent1b4aa4f14c4e2449345e2f1c23cc88319cc3a649 (diff)
#i90599# fix a case of incomplete accel sequences (thanks cmc and dtardon)
Diffstat (limited to 'vcl/source/window/accmgr.cxx')
-rw-r--r--vcl/source/window/accmgr.cxx17
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 );
}