File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Bundle/CoreBundle/EventSubscriber Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public function onFlush(OnFlushEventArgs $args)
65
65
$ updatedEntities = $ this ->uow ->getScheduledEntityUpdates ();
66
66
$ deletedEntities = $ this ->uow ->getScheduledEntityDeletions ();
67
67
68
- //Update CSS of this widget View and its inheritors if this View is a Template
68
+ //Update View's CSS and inheritors of updated and deleted widgets
69
69
foreach (array_merge ($ updatedEntities , $ deletedEntities ) as $ entity ) {
70
70
if (!($ entity instanceof Widget)) {
71
71
continue ;
@@ -76,7 +76,7 @@ public function onFlush(OnFlushEventArgs $args)
76
76
$ this ->updateTemplateInheritorsCss ($ view );
77
77
}
78
78
79
- //Remove CSS of this widget View and update its inheritors if this View is a Template
79
+ //Remove CSS of deleted View and update its inheritors
80
80
foreach ($ deletedEntities as $ entity ) {
81
81
if (!($ entity instanceof View)) {
82
82
continue ;
@@ -85,6 +85,16 @@ public function onFlush(OnFlushEventArgs $args)
85
85
$ this ->viewCssBuilder ->removeCssFile ($ entity ->getCssHash ());
86
86
$ this ->updateTemplateInheritorsCss ($ entity );
87
87
}
88
+
89
+ //Update CSS of updated View and its inheritors
90
+ foreach ($ updatedEntities as $ entity ) {
91
+ if (!($ entity instanceof View)) {
92
+ continue ;
93
+ }
94
+
95
+ $ this ->updateViewCss ($ entity );
96
+ $ this ->updateTemplateInheritorsCss ($ entity );
97
+ }
88
98
}
89
99
90
100
/**
You can’t perform that action at this time.
0 commit comments