AKROGIS / ThemeManager

NPS Alaska's GIS Theme Manager
2 stars 0 forks source link

Don't clear sub-themes on reload #12

Open regan-sarwas opened 5 years ago

regan-sarwas commented 5 years ago

Currently when reloading a theme, all children are destroyed. This removes any custom paths to metadata, and any custom tags, summary, description data.

It makes sense to start with a clean slate, since reloading a theme could end up with all new sub-themes, or subtle changes to the equivalent sub-themes. However in many cases, when reloading a layerfile (or mxd) with multiple children, most sub-themes are the same. It seems reasonable to look at the new children and if any of the names are the same, then reuse (update the data path, and metadata path (so long as the new value is not null), but leave tags, description, summary as is (unless the user chooses to resync the metadata)) If there are existing children that did not match, then they get deleted. If there are new children that did not get a match, then they are added. This would be done recursively for all group layers.