From: Włodzimierz Skiba <abx@abx.art.pl>
Date: Tue, 10 May 2005 19:10:52 +0000 (+0000)
Subject: Do not send event for already selected menu radio item selection.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/26c36d7505555ffb4b103780cba263693e0f2af9

Do not send event for already selected menu radio item selection.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/docs/changes.txt b/docs/changes.txt
index 8b1ec9da37..5cc5640d67 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -12,6 +12,7 @@ All:
 All (GUI):
 
 - Fixed potential infinite loop when adjusting wxScrolledWindow scrollbars.
+- Radio in menus do not send menu event for selections of already selected item.
 
 wxMSW:
 
diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp
index 6127486170..ae37a7fbd8 100644
--- a/src/common/framecmn.cpp
+++ b/src/common/framecmn.cpp
@@ -205,6 +205,9 @@ bool wxFrameBase::ProcessCommand(int id)
         if (!item->IsEnabled())
             return true;
 
+        if ((item->GetKind() == wxITEM_RADIO) && item->IsChecked() )
+            return true;
+
         if (item->IsCheckable())
         {
             item->Toggle();