Browse Source

【编辑】右侧菜单颜色面板NSColorPanel 卡顿修复

lizhe 1 year ago
parent
commit
068e9152a0

File diff suppressed because it is too large
+ 319 - 485
PDF Office/PDF Master.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist


+ 5 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.m

@@ -210,9 +210,11 @@
 - (void)loadView {
     [super loadView];
     
-    if([NSColorPanel sharedColorPanel].visible) {
-        [[NSColorPanel sharedColorPanel] close];
-    }
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if([NSColorPanel sharedColorPanel].visible) {
+            [[NSColorPanel sharedColorPanel] close];
+        }
+    });
     
     self.fonts = [NSFont supportFonts];
     [self loadingUIAndLocalization];