]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/accel.cpp
Get rid of wxFontMapper in wxBase library.
[wxWidgets.git] / src / generic / accel.cpp
index 65f0fa94f2351b6f4593c8b4961960a27761c3a4..3bc6df37be36bd92f92dd9b19a4218597beebc08 100644 (file)
@@ -139,7 +139,11 @@ void wxAcceleratorTable::Remove(const wxAcceleratorEntry& entry)
     {
         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();
             M_ACCELDATA->m_accels.Erase(node);