Templates: Fix "Discard changes?" dialog after creating template with master template (fixes #20262) (#20749)
Moves the _data.updateCurrent() call inside the updateLayoutBlock conditional in setMasterTemplate(). This prevents spurious change detection when loading templates from the server, while maintaining proper change tracking when users actually modify the master template via the UI. This completes the fix started in PR #20529 which added the updateLayoutBlock parameter but inadvertently left the data model update outside the conditional. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -123,9 +123,8 @@ export class UmbTemplateWorkspaceContext
|
|||||||
|
|
||||||
if (updateLayoutBlock) {
|
if (updateLayoutBlock) {
|
||||||
this.#updateMasterTemplateLayoutBlock();
|
this.#updateMasterTemplateLayoutBlock();
|
||||||
}
|
|
||||||
|
|
||||||
this._data.updateCurrent({ masterTemplate: unique ? { unique } : null });
|
this._data.updateCurrent({ masterTemplate: unique ? { unique } : null });
|
||||||
|
}
|
||||||
|
|
||||||
return unique;
|
return unique;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user