offer option to reload file

This commit is contained in:
Riccardo Mottola 2021-04-05 19:51:42 +02:00
parent 2ace3c327a
commit f9ed96a3e4

View file

@ -675,11 +675,19 @@
PCLogInfo(self, @"File modified externally. %@ - %@", _lastSaveDate, fileModDate);
choice = NSRunAlertPanel(@"Overwrite File?",
@"File %@ was modified externally. Overwrite?",
@"Cancel", nil, @"Proceed", [_path lastPathComponent]);
@"Cancel", @"Reload", @"Proceed", [_path lastPathComponent]);
if (choice == NSAlertDefaultReturn)
{
return NO;
}
else if (choice == NSAlertAlternateReturn)
{
NSLog(@"Self");
if ([self revertFileToSaved] == YES)
return NO;
NSLog(@"reload failed");
return NO;
}
}
[[NSNotificationCenter defaultCenter]