Skip to content

Commit 1f1ed18

Browse files
committed
chore: Review adjustments
1 parent 7df7921 commit 1f1ed18

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

editors/base-element-editor.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ export class BaseElementEditor extends ScopedElementsMixin(LitElement) {
6060

6161
@query('.change.dataset') changeDataSet!: MdIconButton;
6262

63+
get hasCopyControlSelected(): boolean {
64+
return this.controlBlockCopyOptions.some(o => o.selected);
65+
}
66+
6367
protected selectDataSet(dataSet: Element): void {
6468
const name = dataSet.getAttribute('name');
6569
if (!name || !this.selectCtrlBlock) return;
@@ -283,14 +287,21 @@ export class BaseElementEditor extends ScopedElementsMixin(LitElement) {
283287
@change=${() => {
284288
// eslint-disable-next-line no-param-reassign
285289
option.selected = !option.selected;
290+
this.requestUpdate();
286291
}}
287292
?disabled=${option.status !== ControlBlockCopyStatus.CanCopy}
288293
>
289294
</md-checkbox>
290295
</label>`
291296
)}
292297
<div class="copy-button">
293-
<md-outlined-button @click=${this.copyControlBlock}
298+
<md-outlined-button
299+
@click=${() => this.copyControlBlockDialog.close()}
300+
>Close</md-outlined-button
301+
>
302+
<md-outlined-button
303+
@click=${this.copyControlBlock}
304+
?disabled=${!this.hasCopyControlSelected}
294305
>Copy</md-outlined-button
295306
>
296307
</div>

editors/report/report-control-editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class ReportControlEditor extends BaseElementEditor {
144144
callback: () => {
145145
const lDevice = rpControl.closest('LDevice');
146146
if (!lDevice) {
147-
throw new Error('GSEControl has no LDevice parent');
147+
throw new Error('ReportControl has no LDevice parent');
148148
}
149149

150150
const otherIEDs = this.queryIEDs().filter(

0 commit comments

Comments
 (0)