Revision: 29054
http://sourceforge.net/p/bibdesk/svn/29054
Author: hofman
Date: 2025-02-23 17:14:19 +0000 (Sun, 23 Feb 2025)
Log Message:
-----------
don't use invalidateCount method to invalidate the smart group count, just set
count to -1
Modified Paths:
--------------
trunk/bibdesk/BDSKSmartGroup.h
trunk/bibdesk/BDSKSmartGroup.m
trunk/bibdesk/BibDocument_Groups.m
Modified: trunk/bibdesk/BDSKSmartGroup.h
===================================================================
--- trunk/bibdesk/BDSKSmartGroup.h 2025-02-23 15:23:04 UTC (rev 29053)
+++ trunk/bibdesk/BDSKSmartGroup.h 2025-02-23 17:14:19 UTC (rev 29054)
@@ -57,8 +57,6 @@
@property (nonatomic, strong) BDSKFilter *filter;
-- (void)invalidateCount;
-
@end
NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/BDSKSmartGroup.m
===================================================================
--- trunk/bibdesk/BDSKSmartGroup.m 2025-02-23 15:23:04 UTC (rev 29053)
+++ trunk/bibdesk/BDSKSmartGroup.m 2025-02-23 17:14:19 UTC (rev 29054)
@@ -184,8 +184,4 @@
return [[item owner] isEqual:[self document]] && [filter testItem:item];
}
-- (void)invalidateCount {
- [self setCount:-1];
-}
-
@end
Modified: trunk/bibdesk/BibDocument_Groups.m
===================================================================
--- trunk/bibdesk/BibDocument_Groups.m 2025-02-23 15:23:04 UTC (rev 29053)
+++ trunk/bibdesk/BibDocument_Groups.m 2025-02-23 17:14:19 UTC (rev 29054)
@@ -255,7 +255,7 @@
- (void)handleFilterChangedNotification:(NSNotification *)notification{
BDSKSmartGroup *group = [notification object];
if ([group document] == self) {
- [group invalidateCount];
+ [group setCount:-1];
[self performSelectorOnce:@selector(updateSmartGroups) withObject:nil
afterDelay:0.0];
}
}
@@ -551,7 +551,7 @@
NSArray *selectedGroups = [self selectedGroups];
// update the count for the smart groups when we're not loading a new set
and they're displayed
- [[groups smartGroups]
makeObjectsPerformSelector:@selector(invalidateCount)];
+ [[groups smartGroups] setValue:@-1 forKey:@"count"];
if ([groupOutlineView isItemExpanded:[groups smartParent]] &&
[sortGroupsKey isEqualToString:BDSKDocumentCountKey])
[[groups smartParent] resort];
@@ -569,7 +569,7 @@
BOOL isSelected = NO;
if (updateSmartGroups) {
- [[groups smartGroups]
makeObjectsPerformSelector:@selector(invalidateCount)];
+ [[groups smartGroups] setValue:@-1 forKey:@"count"];
isSelected = [self hasGroupTypeSelected:BDSKSmartGroupType];
if ([groupOutlineView isItemExpanded:[groups smartParent]]) {
if ([sortGroupsKey isEqualToString:BDSKDocumentCountKey]) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit