From 25fd902e590b533f53682513fa156bb514eda3ad Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Fri, 28 Sep 2012 15:18:00 +0300 Subject: [PATCH] [ios] Disabled deleting of the last remaining bookmark set. --- iphone/Maps/Bookmarks/SelectSetVC.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Bookmarks/SelectSetVC.mm b/iphone/Maps/Bookmarks/SelectSetVC.mm index c275c2b772..0f69e637f2 100644 --- a/iphone/Maps/Bookmarks/SelectSetVC.mm +++ b/iphone/Maps/Bookmarks/SelectSetVC.mm @@ -115,7 +115,10 @@ // Return NO if you do not want the specified item to be editable. if (indexPath.section == 0) return NO; - return YES; + // Disable deleting of the last remaining set (can be activated by swipe right on a set item) + if (GetFramework().GetBmCategoriesCount() > 1) + return YES; + return NO; } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath