Skip to content

Commit

Permalink
added multiple selection for file open panel for images
Browse files Browse the repository at this point in the history
  • Loading branch information
lostjared committed Apr 7, 2018
1 parent 208492c commit 148bedf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Binary file not shown.
12 changes: 9 additions & 3 deletions Acid.Cam.v2.OSX/AC_Controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,16 @@ - (IBAction) selectImage: (id) sender {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles: YES];
[panel setAllowedFileTypes: [NSArray arrayWithObjects: @"jpg", @"png", nil]];
[panel setAllowsMultipleSelection: YES];
[panel setAllowedFileTypes: [NSArray arrayWithObjects: @"bmp",@"jpg", @"png", nil]];
if([panel runModal]) {
NSString *file_name = [[panel URL] path];
[image_combo addItemWithObjectValue: file_name];
NSArray *file_names = [panel URLs];
if([file_names count] > 0) {
for(unsigned int i = 0; i < [file_names count]; ++i) {
NSURL *file_n = [file_names objectAtIndex:i];
[image_combo addItemWithObjectValue: [file_n path]];
}
}
}
}
- (IBAction) setAsImage: (id) sender {
Expand Down
Binary file added colorkeyed_images/star_cutout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 148bedf

Please sign in to comment.