ifindex>-1andopts.save_selected_onlyand(index>0ornotopts.return_grid):# ensures we are looking at a specific non-grid picture, and we have save_selected_only
ifindex>-1andopts.save_selected_onlyand(index>0ornotopts.return_grid):# ensures we are looking at a specific non-grid picture, and we have save_selected_only