From 67f2c6028613c8230393698368cd21b274299189 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 13 Jun 2021 17:17:47 -0400 Subject: [PATCH] method to reset the machine view controller. --- Ample/LaunchWindowController.m | 1 + Ample/NewMachineViewController.h | 2 ++ Ample/NewMachineViewController.m | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/Ample/LaunchWindowController.m b/Ample/LaunchWindowController.m index 2c39eff..57a26e6 100644 --- a/Ample/LaunchWindowController.m +++ b/Ample/LaunchWindowController.m @@ -715,6 +715,7 @@ static NSString *ShellQuote(NSString *s) { if (!d) { [self resetAll: sender]; [self setMachine: nil]; + [_machineViewController reset]; [_slotController setMachine: nil]; return; } diff --git a/Ample/NewMachineViewController.h b/Ample/NewMachineViewController.h index a47e0a4..9914b3b 100644 --- a/Ample/NewMachineViewController.h +++ b/Ample/NewMachineViewController.h @@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable) NSString *machine; +-(void)reset; + @end @interface NewMachineViewController (Table) diff --git a/Ample/NewMachineViewController.m b/Ample/NewMachineViewController.m index ff7348b..32d8c6f 100644 --- a/Ample/NewMachineViewController.m +++ b/Ample/NewMachineViewController.m @@ -61,6 +61,11 @@ } +-(void)reset { + + [_outlineView deselectAll: nil]; + [self setMachine: nil]; +} @end