Really do nothing if pressed on an already pressed
radio toolbar button tool git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -154,7 +154,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
|
static void gtk_toolbar_callback( GtkWidget *widget,
|
||||||
wxToolBarTool *tool )
|
wxToolBarTool *tool )
|
||||||
{
|
{
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
@@ -169,6 +169,14 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
|
|||||||
|
|
||||||
if (tool->CanBeToggled())
|
if (tool->CanBeToggled())
|
||||||
{
|
{
|
||||||
|
if (tool->IsRadio() &&
|
||||||
|
gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget)) &&
|
||||||
|
tool->IsToggled())
|
||||||
|
{
|
||||||
|
// pressed an already pressed radio button
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tool->Toggle();
|
tool->Toggle();
|
||||||
|
|
||||||
tool->SetImage(tool->GetBitmap());
|
tool->SetImage(tool->GetBitmap());
|
||||||
|
Reference in New Issue
Block a user