File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ struct ControlsView: View {
141
141
return Text ( prefix) . foregroundColor ( downloaded ? . accentColor : . secondary) + Text( model. modelVersion)
142
142
}
143
143
144
+ var modelFilename : String ? {
145
+ guard let pipelineLoader = pipelineLoader else { return nil }
146
+ let selectedPath = pipelineLoader. compiledPath
147
+ guard selectedPath. exists else { return nil }
148
+ return selectedPath. string
149
+ }
150
+
144
151
var body : some View {
145
152
VStack ( alignment: . leading) {
146
153
@@ -161,8 +168,7 @@ struct ControlsView: View {
161
168
}
162
169
. onChange ( of: model) { selection in
163
170
guard selection != revealOption else {
164
- let selected = pipelineLoader? . compiledPath
165
- NSWorkspace . shared. selectFile ( selected? . string, inFileViewerRootedAtPath: PipelineLoader . models. string)
171
+ NSWorkspace . shared. selectFile ( modelFilename, inFileViewerRootedAtPath: PipelineLoader . models. string)
166
172
model = Settings . shared. currentModel. modelVersion
167
173
return
168
174
}
You can’t perform that action at this time.
0 commit comments