Fixed use of map::erase() in ClearActionTriggers() (this bug was revealed by static code analysis - see ticket #11195)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
02ca710b3b
commit
36a2b429ae
@ -5232,14 +5232,25 @@ void wxPropertyGrid::AddActionTrigger( int action, int keycode, int modifiers )
|
||||
void wxPropertyGrid::ClearActionTriggers( int action )
|
||||
{
|
||||
wxPGHashMapI2I::iterator it;
|
||||
bool didSomething;
|
||||
|
||||
for ( it = m_actionTriggers.begin(); it != m_actionTriggers.end(); ++it )
|
||||
do
|
||||
{
|
||||
if ( it->second == action )
|
||||
didSomething = false;
|
||||
|
||||
for ( it = m_actionTriggers.begin();
|
||||
it != m_actionTriggers.end();
|
||||
it++ )
|
||||
{
|
||||
m_actionTriggers.erase(it);
|
||||
if ( it->second == action )
|
||||
{
|
||||
m_actionTriggers.erase(it);
|
||||
didSomething = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while ( didSomething );
|
||||
}
|
||||
|
||||
void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
||||
|
Loading…
Reference in New Issue
Block a user