File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,12 @@ - (IBAction)analyze:(id)sender {
91
91
92
92
NSArray *sortedSymbols = [self sortSymbols: symbols];
93
93
94
- if (_groupButton.state == 1 ) {
94
+ __block NSControlStateValue groupButtonState;
95
+ dispatch_sync (dispatch_get_main_queue (), ^{
96
+ groupButtonState = _groupButton.state ;
97
+ });
98
+
99
+ if (1 == groupButtonState) {
95
100
[self buildCombinationResultWithSymbols: sortedSymbols];
96
101
} else {
97
102
[self buildResultWithSymbols: sortedSymbols];
@@ -171,7 +176,11 @@ - (void)buildResultWithSymbols:(NSArray *)symbols {
171
176
self.result = [@" 文件大小\t 文件名称\r\n\r\n " mutableCopy ];
172
177
NSUInteger totalSize = 0 ;
173
178
174
- NSString *searchKey = _searchField.stringValue ;
179
+ __block NSString *searchKey;
180
+ dispatch_sync (dispatch_get_main_queue (), ^{
181
+ searchKey = _searchField.stringValue ;
182
+ });
183
+
175
184
176
185
for (SymbolModel *symbol in symbols) {
177
186
if (searchKey.length > 0 ) {
You can’t perform that action at this time.
0 commit comments