]> git.saurik.com Git - wxWidgets.git/commitdiff
set command int (indicating whether the item is checked) correctly for the menu event...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Jan 2007 14:13:52 +0000 (14:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Jan 2007 14:13:52 +0000 (14:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/wince/tbarwce.cpp

index 27a5d7b31364bfe77d2aa2d95fdd1aac2a161d2d..45d5c811723ac79e18644bcf1f9a677ca2c74d47 100644 (file)
@@ -491,19 +491,21 @@ bool wxToolMenuBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
     wxToolBarToolBase *tool = FindById((int)id);
     if ( !tool )
     {
-        if (m_menuBar)
+        bool checked = false;
+        if ( m_menuBar )
         {
             wxMenuItem *item = m_menuBar->FindItem(id);
-            if (item && item->IsCheckable())
+            if ( item && item->IsCheckable() )
             {
                 item->Toggle();
+                checked = item->IsChecked();
             }
         }
 
         wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED);
         event.SetEventObject(this);
         event.SetId(id);
-        event.SetInt(id);
+        event.SetInt(checked);
 
         return GetEventHandler()->ProcessEvent(event);
     }