@@ -92,7 +92,7 @@ export class Model implements IModel {
92
92
for ( const item of this . changeSet . keys ( ) ) {
93
93
changeSet . add ( item ) ;
94
94
}
95
- modelLog ( 'observeDeep' , doc . clientID , event [ 0 ] , changeSet ) ;
95
+ modelLog ( 'observeDeep' , doc . clientID , changeSet ) ;
96
96
this . render ( changeSet ) ;
97
97
this . changeSet = new Set < ChangeEventType > ( ) ;
98
98
} ) ;
@@ -125,7 +125,7 @@ export class Model implements IModel {
125
125
if ( changeSet . size === 0 ) {
126
126
return ;
127
127
}
128
- modelLog ( changeSet ) ;
128
+ modelLog ( 'render' , changeSet ) ;
129
129
eventEmitter . emit ( 'modelChange' , { changeSet } ) ;
130
130
}
131
131
async emitChange ( changeSet : Set < ChangeEventType > ) {
@@ -141,13 +141,6 @@ export class Model implements IModel {
141
141
'customWidth' ,
142
142
] ;
143
143
144
- for ( const item of localChangeList ) {
145
- if ( changeSet . has ( item ) ) {
146
- this . changeSet . add ( item ) ;
147
- changeSet . delete ( item ) ;
148
- }
149
- }
150
-
151
144
if (
152
145
changeSet . has ( 'cellValue' ) ||
153
146
changeSet . has ( 'definedNames' ) ||
@@ -158,7 +151,15 @@ export class Model implements IModel {
158
151
this . changeSet . add ( 'cellValue' ) ;
159
152
}
160
153
}
161
- if ( changeSet . size === 0 && this . changeSet . size > 0 ) {
154
+
155
+ for ( const item of localChangeList ) {
156
+ if ( changeSet . has ( item ) ) {
157
+ this . changeSet . add ( item ) ;
158
+ changeSet . delete ( item ) ;
159
+ }
160
+ }
161
+
162
+ if ( this . changeSet . size > 0 ) {
162
163
this . render ( this . changeSet ) ;
163
164
this . changeSet = new Set < ChangeEventType > ( ) ;
164
165
}
@@ -249,7 +250,6 @@ export class Model implements IModel {
249
250
this . filterManager . fromJSON ( json ) ;
250
251
this . scrollManager . fromJSON ( json ) ;
251
252
this . worksheetManager . computeFormulas ( ) ;
252
- // this.undoManager.clear(true, true);
253
253
} ;
254
254
toJSON = ( ) : ModelJSON => {
255
255
const temp = this . getRoot ( ) . toJSON ( ) ;
0 commit comments