Fix logic in SendToMarsEditCommand where it finds the app to talk to. A running app takes precedence.

This commit is contained in:
Brent Simmons 2018-01-14 11:12:28 -08:00
parent 39d6086e0c
commit f9c5c5ad60
1 changed files with 5 additions and 1 deletions

View File

@ -39,11 +39,15 @@ private extension SendToMarsEditCommand {
func appToUse() -> UserApp? { func appToUse() -> UserApp? {
marsEditApps.forEach{ $0.updateStatus() }
for app in marsEditApps { for app in marsEditApps {
app.updateStatus()
if app.isRunning { if app.isRunning {
return app return app
} }
}
for app in marsEditApps {
if app.existsOnDisk { if app.existsOnDisk {
return app return app
} }