File tree 1 file changed +15
-8
lines changed
packages/project-editor/lvgl
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -1227,10 +1227,9 @@ export class LVGLBuild extends Build {
1227
1227
build . project . settings . build . screensLifetimeSupport &&
1228
1228
! page . isUsedAsUserWidget
1229
1229
) {
1230
- build . line (
1230
+ build . blockStart (
1231
1231
`void ${ this . getScreenDeleteFunctionName ( page ) } () {`
1232
1232
) ;
1233
- build . indent ( ) ;
1234
1233
1235
1234
if ( this . isV9 ) {
1236
1235
build . line (
@@ -1256,11 +1255,16 @@ export class LVGLBuild extends Build {
1256
1255
}
1257
1256
}
1258
1257
1259
- build . line (
1260
- `deletePageFlowState(${ build . assets . getFlowIndex ( page ) } );`
1261
- ) ;
1262
- build . unindent ( ) ;
1263
- build . line ( "}" ) ;
1258
+ if ( build . project . projectTypeTraits . hasFlowSupport ) {
1259
+ build . line (
1260
+ `deletePageFlowState(${ build . assets . getFlowIndex (
1261
+ page
1262
+ ) } );`
1263
+ ) ;
1264
+ }
1265
+
1266
+ build . blockEnd ( "}" ) ;
1267
+
1264
1268
build . line ( "" ) ;
1265
1269
}
1266
1270
@@ -1655,7 +1659,10 @@ export class LVGLBuild extends Build {
1655
1659
build . line ( "" ) ;
1656
1660
}
1657
1661
1658
- if ( build . project . settings . build . screensLifetimeSupport ) {
1662
+ if (
1663
+ this . assets . projectStore . projectTypeTraits . hasFlowSupport &&
1664
+ build . project . settings . build . screensLifetimeSupport
1665
+ ) {
1659
1666
build . line ( "eez_flow_set_create_screen_func(create_screen);" ) ;
1660
1667
build . line ( "eez_flow_set_delete_screen_func(delete_screen);" ) ;
1661
1668
build . line (
You can’t perform that action at this time.
0 commit comments