Skip modified tabs when opening with “close other”

This commit is contained in:
Allan Odgaard
2013-01-20 07:34:18 +01:00
parent fe3dff7af6
commit cd40111b91

View File

@@ -686,7 +686,8 @@ namespace
NSMutableIndexSet* indexSet = [NSMutableIndexSet indexSet];
for(size_t i = 0; i < newDocuments.size(); ++i)
{
if(uuids.find(newDocuments[i]->identifier()) == uuids.end())
document::document_ptr doc = newDocuments[i];
if(!doc->is_modified() && uuids.find(doc->identifier()) == uuids.end())
[indexSet addIndex:i];
}
[self closeTabsAtIndexes:indexSet askToSaveChanges:YES createDocumentIfEmpty:NO];