Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lostjared committed Jan 15, 2020
1 parent da3948b commit afff77a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Binary file not shown.
8 changes: 1 addition & 7 deletions Acid.Cam.v2.OSX/AC_Controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2736,9 +2736,7 @@ - (IBAction) user_Save: (id) sender {
for(auto i = user_filter.begin(); i != user_filter.end(); ++i) {
if(i->second.index != -1) {
std::cout << "loaded menu item: " << i->first << ":" << i->second.sort_num << "\n";
UserArgType type = UserArgType(i->second.sort_num, i->first.c_str());
type.other = i->second.other_name;
items.push_back(type);
items.push_back(UserArgType(i->second.sort_num, i->first.c_str(), i->second.other_name));
}
}
std::sort(items.begin(), items.end());
Expand Down Expand Up @@ -2826,21 +2824,17 @@ - (void) loadMenuList {
NSInteger index_value = [categories_custom indexOfSelectedItem];
NSInteger index_value_ex = [categories indexOfSelectedItem];
user_menu = [[NSMenu alloc] init];

std::vector<UserArgType> items;

for(auto i = user_filter.begin(); i != user_filter.end(); ++i) {
if(i->second.index != -1) {
std::cout << "loaded menu item: " << i->first << ":" << i->second.sort_num << "\n";
items.push_back(UserArgType(i->second.sort_num, i->first.c_str()));
}
}
std::sort(items.begin(), items.end());

for(auto i = items.begin(); i != items.end(); ++i) {
[user_menu addItemWithTitle: [NSString stringWithUTF8String:i->name.c_str()] action:nil keyEquivalent:@""];
}

[user_menu addItemWithTitle: [NSString stringWithUTF8String:"No Filter"] action:nil keyEquivalent:@""];
if((index_value == 14 || index_value_ex == 14) && [user_menu numberOfItems] > 0) {
[current_filter_custom setMenu: user_menu];
Expand Down

0 comments on commit afff77a

Please sign in to comment.