Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-reload object types file when changed externally #2674

Merged
merged 4 commits into from Nov 20, 2019

Conversation

@jacobcoughenour
Copy link
Contributor

jacobcoughenour commented Nov 17, 2019

related to issue #1816

I added a FileSystemWatcher to Preferences to watch the objecttypes.xml for changes. When the file changes, it calls setObjectTypes() which emits the objectTypesChanged.

I also had to modify the ObjectTypesEditor to listen for the Preferences::objectTypesChanged signal so it will also update for external changes.

Copy link
Owner

bjorn left a comment

Thanks for this improvement! I've left a few minor comments inline.

I'd like to include this in Tiled 1.3.1, which I plan to release tomorrow.

src/tiled/objecttypeseditor.cpp Outdated Show resolved Hide resolved
src/tiled/preferences.cpp Outdated Show resolved Hide resolved
@jacobcoughenour jacobcoughenour requested a review from bjorn Nov 19, 2019
@bjorn
bjorn approved these changes Nov 20, 2019
@bjorn bjorn merged commit 4d1fd8e into bjorn:master Nov 20, 2019
1 of 3 checks passed
1 of 3 checks passed
build
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.