Fix .txt import not working.
This commit is contained in:
1 parent
31280c4f41
commit
b6c5407917
1 file changed
+7
-4
@@ -768,13 +768,16 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
panel.canChooseDirectories = NO;
|
||||
|
||||
MP42ChapterTrack *chapters = self.mp4.chapters;
|
||||
|
||||
NSMutableArray<NSString *> *supportedFileFormats = [[MP42FileImporter supportedFileFormats] mutableCopy];
|
||||
[supportedFileFormats addObject:@"txt"];
|
||||
|
||||
if (chapters) {
|
||||
panel.allowedFileTypes = [[MP42FileImporter supportedFileFormats] arrayByAddingObject:@"csv"];
|
||||
}
|
||||
else {
|
||||
panel.allowedFileTypes = [MP42FileImporter supportedFileFormats];
|
||||
[supportedFileFormats addObject:@"csv"];
|
||||
}
|
||||
|
||||
panel.allowedFileTypes = supportedFileFormats;
|
||||
|
||||
[panel beginSheetModalForWindow:documentWindow completionHandler:^(NSInteger result) {
|
||||
if (result == NSFileHandlingPanelOKButton) {
|
||||
NSString *fileExtension = panel.URLs.firstObject.pathExtension;
|
||||
|
||||
Reference in new issue
Block a user