Skip to content

Commit fe77f19

Browse files
committed
adding debug
1 parent 1558252 commit fe77f19

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

webui/src/js/models/wdt-model-definition.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,22 @@ define(['knockout', 'utils/observable-properties', 'js-yaml', 'utils/validation-
510510
let isChanged = props.createGroup(name, this).isChanged();
511511

512512
// properties content is managed internally
513-
isChanged = isChanged || this.internal.propertiesContent.isChanged();
513+
if (this.internal.propertiesContent.isChanged()) {
514+
wktLogger.debug('model properties content has changed');
515+
isChanged = true;
516+
}
514517

515518
// check flag indicating model text changes
516-
isChanged = isChanged || this.modelTextChanged;
519+
if (this.modelTextChanged) {
520+
wktLogger.debug('model content has changed');
521+
isChanged = true;
522+
}
517523

518524
// any outstanding archive updates indicate a change
519-
const hasArchiveUpdates = this.archiveUpdates.length > 0;
520-
isChanged = isChanged || hasArchiveUpdates;
525+
if (this.archiveUpdates.length > 0) {
526+
wktLogger.debug('model archive content has changed');
527+
isChanged = true;
528+
}
521529

522530
return isChanged;
523531
};

webui/src/js/viewModels/model-design-view.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,10 @@ function(accUtils, i18n, ko, project, urlCatalog, viewHelper, wktLogger, ViewMod
173173
this.wrcBackendTriggerChange = true;
174174
this.project.wdtModel.modelContent(event.detail.value);
175175
if (event.detail.properties) {
176-
// Model properties initially passed to WRC was a deep copy
177-
// created using the spread operator. event.detail.properties
178-
// contains what the model properties need to be now, which
179-
// may in fact result in the removal of some of the original
180-
// ones passed to the WRC.
176+
// Model properties initially passed to WRC was a deep copy.
177+
// event.detail.properties contains what the model properties
178+
// need to be now, which may in fact result in the removal of
179+
// some of the original ones passed to the WRC.
181180
const existingProperties = filterOriginalModelProperties(
182181
this.project.wdtModel.getModelPropertiesObject().observable(),
183182
event.detail.properties

0 commit comments

Comments
 (0)