Revision: 22432
http://sourceforge.net/p/bibdesk/svn/22432
Author: hofman
Date: 2018-07-18 09:19:13 +0000 (Wed, 18 Jul 2018)
Log Message:
-----------
only add default attributes when there are any
Modified Paths:
--------------
trunk/bibdesk/BDSKFormatStringFormatter.m
Modified: trunk/bibdesk/BDSKFormatStringFormatter.m
===================================================================
--- trunk/bibdesk/BDSKFormatStringFormatter.m 2018-07-18 09:14:57 UTC (rev
22431)
+++ trunk/bibdesk/BDSKFormatStringFormatter.m 2018-07-18 09:19:13 UTC (rev
22432)
@@ -85,13 +85,15 @@
formatError = [errorString retain];
if ([attrs count]) {
- NSMutableAttributedString *mutableAttrString = [attrString
mutableCopy];
NSMutableDictionary *mutableAttrs = [attrs mutableCopy];
[mutableAttrs removeObjectForKey:NSFontAttributeName];
[mutableAttrs removeObjectForKey:NSForegroundColorAttributeName];
- [mutableAttrString addAttributes:mutableAttrs range:NSMakeRange(0,
[attrString length])];
+ if ([mutableAttrs count]) {
+ NSMutableAttributedString *mutableAttrString = [attrString
mutableCopy];
+ [mutableAttrString addAttributes:mutableAttrs range:NSMakeRange(0,
[attrString length])];
+ attrString = [mutableAttrString autorelease];
+ }
[mutableAttrs release];
- attrString = [mutableAttrString autorelease];
}
return attrString;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit