Revision: 12141
http://sourceforge.net/p/skim-app/code/12141
Author: hofman
Date: 2021-03-01 00:15:38 +0000 (Mon, 01 Mar 2021)
Log Message:
-----------
Should not be needed to send accessibility notifications for subviews
Modified Paths:
--------------
trunk/SKColorSwatch.m
Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m 2021-02-28 23:59:26 UTC (rev 12140)
+++ trunk/SKColorSwatch.m 2021-03-01 00:15:38 UTC (rev 12141)
@@ -484,11 +484,6 @@
[colors setArray:newColors];
if (autoResizes && [newColors count] != [oldColors count])
[self sizeToFit];
- if ([self window]) {
- i = [oldColors count];
- while (i-- > 0)
- NSAccessibilityPostNotification([itemViews objectAtIndex:i],
NSAccessibilityUIElementDestroyedNotification);
- }
[itemViews makeObjectsPerformSelector:@selector(removeFromSuperview)];
[itemViews removeAllObjects];
for (i = 0; i < iMax; i++) {
@@ -499,11 +494,7 @@
[itemView release];
}
[self updateSubviewLayout];
- if ([self window]) {
- for (i = 0; i < iMax; i++)
- NSAccessibilityPostNotification([itemViews objectAtIndex:i],
NSAccessibilityCreatedNotification);
- [self invalidateIntrinsicContentSize];
- }
+ [self invalidateIntrinsicContentSize];
[[NSNotificationCenter defaultCenter]
postNotificationName:SKColorSwatchColorsChangedNotification object:self];
}
@@ -625,7 +616,6 @@
[self deactivate];
[self willChangeColors];
[colors insertObject:color atIndex:i];
- NSAccessibilityPostNotification([itemViews objectAtIndex:i],
NSAccessibilityCreatedNotification);
[self invalidateIntrinsicContentSize];
SKColorSwatchItemView *itemView = [[SKColorSwatchItemView alloc]
initWithFrame:[self frameForItemViewAtIndex:i collapsedIndex:i]];
[itemView setColor:color];
@@ -670,7 +660,6 @@
[self sizeToFit];
[self invalidateIntrinsicContentSize];
[self noteFocusRingMaskChanged];
- NSAccessibilityPostNotification([itemViews
objectAtIndex:i], NSAccessibilityUIElementDestroyedNotification);
}];
} else {
[self willChangeColors];
@@ -680,7 +669,6 @@
[self didChangeColors];
[self invalidateIntrinsicContentSize];
[self updateSubviewLayout];
- NSAccessibilityPostNotification([itemViews
objectAtIndex:draggedIndex], NSAccessibilityUIElementDestroyedNotification);
}
}
}
@@ -699,7 +687,6 @@
[self addSubview:itemView positioned:NSWindowAbove
relativeTo:[itemViews objectAtIndex:to - 1]];
[itemView release];
[color release];
- NSAccessibilityPostNotification([itemViews objectAtIndex:to],
NSAccessibilityMovedNotification);
[self noteFocusRingMaskChanged];
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
[self animateItemViewsCollapsing:-1 frameSize:NSZeroSize];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit