From 06a00371dfba6d9857dc75f48121232fb0ea01b8 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 2 Nov 2026 23:50:37 +0800 Subject: [PATCH] Defer deletion accessibility updates until the remote action has unwound (build 52) --- 大鱼调色/Plugin/DYInspector.mm | 2 +- 大鱼调色/Plugin/DYToolInspector.inc.h | 3 ++- 大鱼调色/Plugin/Info.plist | 2 +- 大鱼调色/Wrapper Application/Info.plist | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/大鱼调色/Plugin/DYInspector.mm b/大鱼调色/Plugin/DYInspector.mm index 84a28f8..b3f0a27 100644 --- a/大鱼调色/Plugin/DYInspector.mm +++ b/大鱼调色/Plugin/DYInspector.mm @@ -798,7 +798,7 @@ static NSImage *DYWheelImage(void) { for(NSView *row in c[@"body"])row.alphaValue=enabled?1:.45; } id maskHost=_embedded?[(DYToolManager*)_manager host]:_manager;NSDictionary *tools=DYReadTools(maskHost,t).document;for(NSDictionary *card in _cards){ - ((NSMutableDictionary *)card)[@"removed"]=@(!_embedded&&DYBaseToolRemoved(tools,card[@"section"][@"key"])); + BOOL removed=!_embedded&&DYBaseToolRemoved(tools,card[@"section"][@"key"]);groupingChanged|=[card[@"removed"]boolValue]!=removed;((NSMutableDictionary *)card)[@"removed"]=@(removed); [card[@"maskPanel"]refreshWithDocument:tools time:t]; NSString *nodeID=_embedded?[(DYToolManager*)_manager nodeID]:[@"base:" stringByAppendingString:card[@"section"][@"key"]];NSUInteger count=[DYMasksForTool(tools,nodeID) count]; [(DYMaskCountBadge*)card[@"maskBadge"]setCount:count];NSString *hint=count?[NSString stringWithFormat:@"已有 %lu 个蒙版;点击添加独立蒙版",(unsigned long)count]:@"添加本工具的独立蒙版"; diff --git a/大鱼调色/Plugin/DYToolInspector.inc.h b/大鱼调色/Plugin/DYToolInspector.inc.h index c985a74..8c2fe85 100644 --- a/大鱼调色/Plugin/DYToolInspector.inc.h +++ b/大鱼调色/Plugin/DYToolInspector.inc.h @@ -45,7 +45,8 @@ if(attempted&&!changed&&!failure)failure=[NSError errorWithDomain:@"com.dayu.color.ToolRemoval" code:1 userInfo:@{NSLocalizedDescriptionKey:@"未能完成删除,模块已保留。可撤销本次参数还原。"}]; dispatch_async(dispatch_get_main_queue(),^{[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:host];if(failure)[self showError:failure.localizedDescription];}); } - if(changed)NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification); + // Model refresh posts accessibility changes after the remote action unwinds. + // Synchronous notification here can re-enter the host's ViewBridge callback. } - (CGFloat)layoutRepeatedToolsAfter:(NSString*)anchor y:(CGFloat)y width:(CGFloat)w {if(_embedded)return y;for(NSString *ID in _stackOrder)if([_stackRoots[ID]isEqual:anchor]){DYInspector *child=_stackViews[ID];child.frame=NSMakeRect(0,y,w,MAX(60,child->_stackHeight));[child layoutSubtreeIfNeeded];CGFloat height=MAX(60,child->_stackHeight);child.frame=NSMakeRect(0,y,w,height);y+=height;}return y;} diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist index 9764c6a..582ef8c 100644 --- a/大鱼调色/Plugin/Info.plist +++ b/大鱼调色/Plugin/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.7.4 CFBundleVersion - 51 + 52 NSHumanReadableCopyright PlugInKit diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist index bd8e5b4..adfbac8 100644 --- a/大鱼调色/Wrapper Application/Info.plist +++ b/大鱼调色/Wrapper Application/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.7.4 CFBundleVersion - 51 + 52 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright