mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Rerender class sheets when subclass link is changed
This commit is contained in:
parent
533421abba
commit
210978fd87
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ export default class SubclassSheet extends DHBaseItemSheet {
|
||||||
const uuid = item._stats.compendiumSource ?? item.uuid;
|
const uuid = item._stats.compendiumSource ?? item.uuid;
|
||||||
if (this.document.system.linkedClass !== uuid) {
|
if (this.document.system.linkedClass !== uuid) {
|
||||||
await this.document.update({ 'system.linkedClass': uuid });
|
await this.document.update({ 'system.linkedClass': uuid });
|
||||||
|
// Re-render all class sheets for instant feedback
|
||||||
|
for (const app of foundry.applications.instances.values()) {
|
||||||
|
if (app.document?.type === 'class') app.render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue