コード例 #1
0
        // Edit button released
        public void OnEditEnd()
        {
            if (General.Interface.IsActiveWindow)
            {
                List <Vertex> verts = mode.GetSelectedVertices();
                updateList = new Dictionary <BaseVisualSector, bool>();

                foreach (Vertex v in verts)
                {
                    VertexData vd = mode.GetVertexData(v);
                    foreach (KeyValuePair <Sector, bool> s in vd.UpdateAlso)
                    {
                        if (mode.VisualSectorExists(s.Key))
                        {
                            BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s.Key);
                            if (!updateList.ContainsKey(vs))
                            {
                                updateList.Add(vs, s.Value);
                            }
                        }
                    }
                }

                General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged;
                mode.StartRealtimeInterfaceUpdate(SelectionType.Vertices);
                General.Interface.ShowEditVertices(verts, false);
                mode.StopRealtimeInterfaceUpdate(SelectionType.Vertices);
                General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged;

                updateList.Clear();
                updateList = null;
            }
        }