Skip to content

Commit e41ad32

Browse files
committed
Fix Run valve isolation trace.
1 parent 7de4194 commit e41ad32

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Shared/Samples/Run valve isolation trace/RunValveIsolationTraceView.Model.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ extension RunValveIsolationTraceView {
148148

149149
addGraphic(for: point, traceLocationType: "starting point")
150150
startingLocationPoint = point
151-
tracingActivity = .none
151+
tracingActivity = nil
152152

153153
// Get available utility categories.
154154
if let definition = utilityNetwork.definition {
@@ -224,9 +224,10 @@ extension RunValveIsolationTraceView {
224224
} catch {
225225
statusText = "Trace failed."
226226
traceEnabled = true
227+
tracingActivity = nil
227228
return
228229
}
229-
tracingActivity = .none
230+
tracingActivity = nil
230231
traceEnabled = true
231232
resetEnabled = true
232233
}

Shared/Samples/Run valve isolation trace/RunValveIsolationTraceView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct RunValveIsolationTraceView: View {
8282
Task { await mapViewProxy.setViewpointCenter(point, scale: 3_000) }
8383
}
8484
}
85-
.disabled(!model.resetEnabled)
85+
.disabled(!model.resetEnabled || model.tracingActivity == .runningTrace)
8686
}
8787
}
8888
.sheet(isPresented: $isConfigurationPresented) {

0 commit comments

Comments
 (0)