diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm index 30e4c7d21622de88c23f3550c3609f8f4acd0e91..b92818a409bdcd957c741c4a5a9bcedd00fbcafa 100644 --- a/contrib/mobile/iOS/Onelab/ModelViewController.mm +++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm @@ -318,12 +318,16 @@ -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if(buttonIndex == 0) [_errors removeAllObjects]; - else [_errors removeLastObject]; - if(_errors.count > 0) { - //[_errorAlert setMessage:[_errors lastObject]]; - [_errorAlert show]; + if(buttonIndex == 0) { + [_errors removeAllObjects]; + return; } + else [_errors removeLastObject]; + if(_errors.count > 1) + _errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:@"Show more", nil]; + else + _errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles: nil]; + [_errorAlert show]; } #pragma mark - Split view