Skip to content

Conversation

@iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Sep 3, 2025

Description

Sets the masterTemplate at each opportunity to avoid Discard Changes dialog.

How to test

  1. Create and save a sub template
  2. Check that "Discard Changes?" is not shown when navigating away
  3. Edit the template, navigate away, and verify that "Discard Changes?" is shown

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR resolves an issue where creating a new sub template would incorrectly show a "Discard Changes" dialog by ensuring the master template is properly set during template creation and loading.

  • Ensures master template is set immediately when loading existing templates
  • Sets the master template preset when creating new sub templates based on the parent
  • Removes conditional wrapping that could delay master template assignment

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) September 3, 2025 13:38
@nielslyngsoe nielslyngsoe merged commit 59a34f6 into main Sep 3, 2025
27 checks passed
@nielslyngsoe nielslyngsoe deleted the v16/bugfix/template-discard-changes branch September 3, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants