You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a plugin (for mapwindow v5.1.1.207023) that serializes metadata associated to each of the layers created by my plugin during the execution. The problem is that when I load the saved project file again and during deserialization I capture the event "plugin.LayerAdded" but the layer has not yet restored its metadata values because the restore function is called after adding the layer:
private bool RestoreLayers(XmlProject project, out int selectedLayerHandle)
{
...
foreach (var xmlLayer in project.Layers
{
...
if (_layerService.AddLayerIdentity(xmlLayer.Identity)) // Add layer and inside called LayerAdded event
{
...
xmlLayer.RestoreLayer(layer, _broadcaster); // Deserialize layer metada
}
Everything would be much easier if in "BasePlugin.cs" had a new event "ProjectOpened" just like there is one for "ProjectClosed", ...
I've created https://mapwindow.atlassian.net/browse/MW5CORE-206 for this.
At the moment we're very busy getting a new version of MWGis out. After that (hopefully in a week) we'll work on a new version of MW5 and then we'll look at this issue.
I am developing a plugin (for mapwindow v5.1.1.207023) that serializes metadata associated to each of the layers created by my plugin during the execution. The problem is that when I load the saved project file again and during deserialization I capture the event "plugin.LayerAdded" but the layer has not yet restored its metadata values because the restore function is called after adding the layer:
Everything would be much easier if in "BasePlugin.cs" had a new event "ProjectOpened" just like there is one for "ProjectClosed", ...
... triggered by the method "public bool Open (string filename, bool silent = true) "from the file" ProjectService.cs "when result is true:
The text was updated successfully, but these errors were encountered: