Skip to content

Make external modded pattern file reload work. Make ext-modded data reload safe.#2457

Open
shewitt-au wants to merge 14 commits into
WerWolv:masterfrom
shewitt-au:reload_fixes
Open

Make external modded pattern file reload work. Make ext-modded data reload safe.#2457
shewitt-au wants to merge 14 commits into
WerWolv:masterfrom
shewitt-au:reload_fixes

Conversation

@shewitt-au

@shewitt-au shewitt-au commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Problem description

If I modify a pattern externally I get an option to reoad it. Taking this option does nothing. The code in FileProvider also handlles reloads, but not in a thread-safe way.

Implementation description

Hooked up the missing bits in the pattern editor. For the file provider (and the pattern editor) I used TaskManager::doLater from the ChangeTracker callback (called from a worker thread) to get the operation handled by the UI thread. Not doing this opens the possibility for unsynchronised access to state by multiple threads.

@shewitt-au shewitt-au changed the title Reload fixes Make pattern file reload work. Make data reload safe. Sep 25, 2025
@shewitt-au shewitt-au marked this pull request as ready for review September 25, 2025 11:01
@shewitt-au shewitt-au changed the title Make pattern file reload work. Make data reload safe. Make external modded pattern file reload work. Make ext-modded data reload safe. Sep 25, 2025
@paxcut paxcut mentioned this pull request Nov 27, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant