Bug #1040683: Remove assert when deleting menu entry.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -139,7 +139,11 @@ void wxAcceleratorTable::Remove(const wxAcceleratorEntry& entry)
|
|||||||
{
|
{
|
||||||
const wxAcceleratorEntry *entryCur = node->GetData();
|
const wxAcceleratorEntry *entryCur = node->GetData();
|
||||||
|
|
||||||
if ( *entryCur == entry )
|
// given entry contains only the information of the accelerator key
|
||||||
|
// because it was set that way in wxGetAccelFromString()
|
||||||
|
// so do not perform full ( *entryCur == entry ) comparison
|
||||||
|
if ((entryCur->GetKeyCode() == entry.GetKeyCode()) &&
|
||||||
|
(entryCur->GetFlags() == entry.GetFlags()))
|
||||||
{
|
{
|
||||||
delete node->GetData();
|
delete node->GetData();
|
||||||
M_ACCELDATA->m_accels.Erase(node);
|
M_ACCELDATA->m_accels.Erase(node);
|
||||||
|
Reference in New Issue
Block a user