Skip to content

Commit f2d8e83

Browse files
author
Dennis Labordus
committed
Small changes.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent b50b760 commit f2d8e83

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/compas/CompasCompareDialog.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ export function compareWizard(
186186
: 'primary'});">
187187
<span>${diff.oldValue?.tagName ?? diff.newValue?.tagName}</span>
188188
<span slot="secondary">
189-
${describe(diff.oldValue)}&cularr;${describe(diff.newValue)}
189+
${describe(diff.oldValue)}
190+
${describe(diff.oldValue) && describe(diff.newValue) ? html`&cularr;` : html``}
191+
${describe(diff.newValue)}
190192
</span>
191193
<mwc-icon slot="meta">compare</mwc-icon>
192194
</mwc-check-list-item>`

src/compas/CompasSaveTo.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ export class CompasSaveTo extends CompasExistsIn(LitElement) {
5151
const sclData = response.querySelectorAll("SclData").item(0).textContent;
5252
const sclDocument = new DOMParser().parseFromString(sclData??'', 'application/xml');
5353

54-
updateDocumentInOpenSCD(sclDocument);
55-
5654
const openScd = getOpenScdElement();
55+
openScd.dispatchEvent(
56+
newLogEvent({
57+
kind: 'reset'
58+
}));
59+
updateDocumentInOpenSCD(sclDocument);
5760
openScd.dispatchEvent(
5861
newLogEvent({
5962
kind: 'info',
@@ -75,9 +78,14 @@ export class CompasSaveTo extends CompasExistsIn(LitElement) {
7578
.then(response => {
7679
const sclData = response.querySelectorAll("SclData").item(0).textContent;
7780
const sclDocument = new DOMParser().parseFromString(sclData??'', 'application/xml');
78-
updateDocumentInOpenSCD(sclDocument);
7981

8082
const openScd = getOpenScdElement();
83+
openScd.dispatchEvent(
84+
newLogEvent({
85+
kind: 'reset'
86+
}));
87+
updateDocumentInOpenSCD(sclDocument);
88+
8189
openScd.dispatchEvent(
8290
newLogEvent({
8391
kind: 'info',

0 commit comments

Comments
 (0)