File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,20 @@ export class DependencyGraph {
224
224
const namedExpression = this . namedExpressions . namedExpressionOrPlaceholder ( expressionName , sheetId )
225
225
return this . fetchCellOrCreateEmpty ( namedExpression . address )
226
226
}
227
-
227
+ public markAllNamedExpressionsAsDirty ( ) : void {
228
+ const allExpressions = this . namedExpressions . getAllNamedExpressions ( ) ;
229
+ for ( const { expression } of allExpressions ) {
230
+ const vertex = this . shrinkPossibleArrayAndGetCell ( expression . address ) ;
231
+ if ( vertex !== undefined ) {
232
+ this . graph . markNodeAsDirty ( vertex ) ;
233
+ }
234
+ }
235
+ }
228
236
public exchangeNode ( addressFrom : SimpleCellAddress , addressTo : SimpleCellAddress ) {
229
- const vertexFrom = this . fetchCellOrCreateEmpty ( addressFrom ) . vertex
230
- const vertexTo = this . fetchCellOrCreateEmpty ( addressTo ) . vertex
231
- this . addressMapping . removeCell ( addressFrom )
232
- this . exchangeGraphNode ( vertexFrom , vertexTo )
237
+ const vertexFrom = this . fetchCellOrCreateEmpty ( addressFrom ) . vertex ;
238
+ const vertexTo = this . fetchCellOrCreateEmpty ( addressTo ) . vertex ;
239
+ this . addressMapping . removeCell ( addressFrom ) ;
240
+ this . exchangeGraphNode ( vertexFrom , vertexTo ) ;
233
241
}
234
242
235
243
public fetchCellOrCreateEmpty ( address : SimpleCellAddress ) : { vertex : CellVertex , id : Maybe < number > } {
Original file line number Diff line number Diff line change @@ -4503,6 +4503,7 @@ export class HyperFormula implements TypedEmitter {
4503
4503
const changes = this . _crudOperations . getAndClearContentChanges ( )
4504
4504
const verticesToRecomputeFrom = this . dependencyGraph . verticesToRecompute ( )
4505
4505
this . dependencyGraph . clearDirtyVertices ( )
4506
+ this . dependencyGraph . markAllNamedExpressionsAsDirty ( )
4506
4507
4507
4508
if ( verticesToRecomputeFrom . length > 0 ) {
4508
4509
changes . addAll ( this . evaluator . partialRun ( verticesToRecomputeFrom ) )
You can’t perform that action at this time.
0 commit comments