@@ -83,6 +83,7 @@ function AppContent() {
83
83
const [ pythonOutput , setPythonOutput ] = useState < TerminalChunk [ ] | null > ( null ) ;
84
84
const [ pythonOutputWasNull , setPythonOutputWasNull ] = useState ( true ) ;
85
85
const [ waveforms , setWaveforms ] = useState < object | null > ( null ) ;
86
+ const [ outputOutOfDate , setOutputOutOfDate ] = useState ( false ) ;
86
87
const [ productsOutOfDate , setProductsOutOfDate ] = useState ( false ) ;
87
88
const [ rtlilProduct , setRtlilProduct ] = useState < string | null > ( null ) ;
88
89
const [ verilogProduct , setVerilogProduct ] = useState < string | null > ( null ) ;
@@ -152,6 +153,7 @@ function AppContent() {
152
153
}
153
154
} finally {
154
155
setRunning ( false ) ;
156
+ setOutputOutOfDate ( false ) ;
155
157
}
156
158
}
157
159
@@ -323,19 +325,21 @@ function AppContent() {
323
325
324
326
const prevAmaranthSource = useRef ( amaranthSource ) ;
325
327
useEffect ( ( ) => {
326
- if ( amaranthSource != prevAmaranthSource . current )
328
+ if ( amaranthSource != prevAmaranthSource . current ) {
329
+ setOutputOutOfDate ( true ) ;
327
330
setProductsOutOfDate ( true ) ;
331
+ }
328
332
prevAmaranthSource . current = amaranthSource ;
329
333
} , [ amaranthSource ] ) ;
330
334
331
335
if ( pythonOutput !== null )
332
336
tabsWithPanels . push ( tabAndPanel ( {
333
337
key : 'python-output' ,
334
338
title : 'Python Output' ,
335
- titleStyle : productsOutOfDate ? { textDecoration : 'line-through' } : { } ,
339
+ titleStyle : outputOutOfDate ? { textDecoration : 'line-through' } : { } ,
336
340
content :
337
341
< Box sx = { { display : 'flex' , flexDirection : 'column' , height : '100%' } } >
338
- { productsOutOfDate && < Alert variant = 'soft' color = 'warning' sx = { { borderRadius : 0 } } >
342
+ { outputOutOfDate && < Alert variant = 'soft' color = 'warning' sx = { { borderRadius : 0 } } >
339
343
The Python output is out of date. Run the program again to refresh it.
340
344
</ Alert > }
341
345
< Box
0 commit comments