コード例 #1
0
ファイル: Scene.cs プロジェクト: lapotkoff/pkis-5
        /// <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();
        }
コード例 #2
0
        /// <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();
        }