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

[bug] changing map data config does not work #15

Closed
lachlangrose opened this issue Jan 23, 2024 · 1 comment
Closed

[bug] changing map data config does not work #15

lachlangrose opened this issue Jan 23, 2024 · 1 comment
Assignees

Comments

@lachlangrose
Copy link
Member

lachlangrose commented Jan 23, 2024

Updating any map_data config does not seem to work
e.g.

proj.map_data.config.geology_config["intrusive_text"] = "IGNEOUS"

Map data is loaded in the init function of the project, I guess its not reloaded when run is called.

I think this is related to #13 and the config file maybe needs to be an attribute of the project that is watched and then when it changes trigger a reload of the map data?

@RoyThomsonMonash any ideas?

@RoyThomsonMonash
Copy link
Contributor

Setting a config variable via that method doesn't indicate that the map needs to be reloaded. Either a setter at the project level needs be to created that also "dirties" the geology map or you can dirty that map specifically:
proj.map_data.dirtyflags[Datatype.GEOLOGY] = True
For a good example of a setter look at proj.set_ignore_codes which calls proj.map_data.set_ignore_codes

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

No branches or pull requests

2 participants