is deleted by the user action the program does not crash sending
the setHighlighted:NO message to it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31158
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
NSButtonCell *buttonCell = m_mouseDownTool->GetNSButtonCell();
if(buttonCell)
{
NSButtonCell *buttonCell = m_mouseDownTool->GetNSButtonCell();
if(buttonCell)
{
[buttonCell setHighlighted: YES];
if([buttonCell trackMouse: theEvent
inRect:AddToolPadding(m_mouseDownTool->GetFrameRect()) ofView:m_cocoaNSView
[buttonCell setHighlighted: YES];
if([buttonCell trackMouse: theEvent
inRect:AddToolPadding(m_mouseDownTool->GetFrameRect()) ofView:m_cocoaNSView
wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked after drag!"));
}
[buttonCell setHighlighted: NO];
wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked after drag!"));
}
[buttonCell setHighlighted: NO];
}
}
return wxToolBarBase::Cocoa_mouseDragged(theEvent);
}
}
return wxToolBarBase::Cocoa_mouseDragged(theEvent);
NSButtonCell *buttonCell = tool->GetNSButtonCell();
if(buttonCell)
{
NSButtonCell *buttonCell = tool->GetNSButtonCell();
if(buttonCell)
{
m_mouseDownTool = tool;
[buttonCell setHighlighted: YES];
if([buttonCell trackMouse: theEvent
m_mouseDownTool = tool;
[buttonCell setHighlighted: YES];
if([buttonCell trackMouse: theEvent
wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked!"));
}
[buttonCell setHighlighted: NO];
wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked!"));
}
[buttonCell setHighlighted: NO];
}
}
return wxToolBarBase::Cocoa_mouseDown(theEvent);
}
}
return wxToolBarBase::Cocoa_mouseDown(theEvent);