Use WebView’s stopLoading instead of killing the running task

This is a more appropriate API to use for signalling that we wish to abort the running command.
This commit is contained in:
Allan Odgaard
2016-08-21 12:24:40 +02:00
parent 89c19eff61
commit 3b3d86a320
3 changed files with 4 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
#import "HTMLOutputWindow.h"
#import <OakAppKit/OakAppKit.h>
#import <OakFoundation/NSString Additions.h>
#import <OakSystem/process.h>
#import <command/runner.h>
#import <oak/debug.h>
@@ -108,7 +107,7 @@ OAK_DEBUG_VAR(HTMLOutputWindow);
if(returnCode == NSAlertDefaultReturn) /* "Stop" */
{
[self.window orderOut:self];
oak::kill_process_group_in_background(_commandRunner->process_id());
[self.htmlOutputView stopLoading];
[self.window close];
}
});