Exemplo n.º 1
0
        public override void redo()
        {
            // if the layer is an area layer, rescale the colormap
            LayerArea layerArea = mLayer as LayerArea;

            if (layerArea != null)
            {
                LayerArea newlayerArea = mNewLayerData as LayerArea;
                if (newlayerArea != null)
                {
                    layerArea.rescaleColorMap(newlayerArea.AreaCellSizeInStud);
                }
            }

            // copy the options
            mLayer.CopyOptionsFrom(mNewLayerData);

            // notify the main form if the visibility changed
            if (mLayerVisibilityChanged)
            {
                MainForm.Instance.NotifyForLayerVisibilityChangedOrLayerDeletion();
            }

            // notify the part list if the name changed
            if (mLayerNameChanged)
            {
                MainForm.Instance.NotifyPartListForLayerRenamed(mLayer);
            }
        }
Exemplo n.º 2
0
        public override void redo()
        {
            // change the background
            Map.Instance.BackgroundColor = mNewBackGroundColor;
            // change the layers
            foreach (LayerChange layerChange in mLayerChanges)
            {
                // if the layer is an area layer, rescale the colormap
                LayerArea areaLayer = layerChange.mReference as LayerArea;
                if (areaLayer != null)
                {
                    LayerArea newlayerArea = layerChange.mNewData as LayerArea;
                    if (newlayerArea != null)
                    {
                        areaLayer.rescaleColorMap(newlayerArea.AreaCellSizeInStud);
                    }
                }

                // copy the options
                layerChange.mReference.CopyOptionsFrom(layerChange.mNewData);
            }
            // notify the main form
            MainForm.Instance.NotifyForMapBackgroundColorChanged();
        }