private void VObjectCollection_SelectedIndexChanged(object sender, SelectedIndexChangedEventArgs e) { if (CurrentLayer != null && CurrentLayer.VObjects.Equals(sender)) { // not call while deserialization if (IsInitialized) { OnCurrentVObjectChanged(); } } }
private void LayerCollection_SelectedIndexChanged(object sender, SelectedIndexChangedEventArgs e) { foreach (var layer in Layers) { SwitchSelectionTracking(layer.VObjects, false); } var currentLayer = CurrentLayer; if (currentLayer != null) { SwitchSelectionTracking(currentLayer.VObjects, true); } // not call while deserialization if (IsInitialized) { OnCurrentLayerChanged(); } }