/// <summary> /// Remove selected layer from scene /// </summary> public void RemoveSelectedLayer() { if (HasNoLayers) return; SelectedLayer.Dispose(); Layers.RemoveAt(SelectedLayerIndex); if (HasNoLayers) _selectedLayerIndex = -1; else _selectedLayerIndex = 0; Invalidate(); InvalidateLayersOrder(); }
/// <summary> /// Remove selected layer from scene /// </summary> public void RemoveSelectedLayer() { if (HasNoLayers) { return; } SelectedLayer.Dispose(); Layers.RemoveAt(SelectedLayerIndex); if (HasNoLayers) { _selectedLayerIndex = -1; } else { _selectedLayerIndex = 0; } Invalidate(); InvalidateLayersOrder(); }