Check for drawing rect within bounds before drawing toolbar item

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38977 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-09-10 13:39:39 +00:00
parent f2bf25a5f8
commit 19aabcd371

View file

@ -536,7 +536,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
- (void) drawRect: (NSRect)rect
{
if (_showLabel)
if (_showLabel && NSIntersectsRect(rect, [self bounds]))
{
NSAttributedString *attrString;
NSDictionary *attr;