From 7e856f0051a62bb51fa45bf827f0c897773b1ff7 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 11 Nov 2015 20:47:37 -0800 Subject: [PATCH] Close map view on OWSE exit --- pk3DS/Subforms/OWSE.cs | 6 ++++++ pk3DS/Subforms/OWSE.designer.cs | 23 ++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/pk3DS/Subforms/OWSE.cs b/pk3DS/Subforms/OWSE.cs index 0a5a969..9041c06 100644 --- a/pk3DS/Subforms/OWSE.cs +++ b/pk3DS/Subforms/OWSE.cs @@ -632,5 +632,11 @@ private void B_Map_Click(object sender, EventArgs e) if (!mapView.Visible) mapView.Show(); } + + private void closingForm(object sender, FormClosingEventArgs e) + { + // Close map view + mapView.Close(); + } } } \ No newline at end of file diff --git a/pk3DS/Subforms/OWSE.designer.cs b/pk3DS/Subforms/OWSE.designer.cs index d3e9490..a200dc5 100644 --- a/pk3DS/Subforms/OWSE.designer.cs +++ b/pk3DS/Subforms/OWSE.designer.cs @@ -153,6 +153,7 @@ private void InitializeComponent() this.RTB_Encounter = new System.Windows.Forms.RichTextBox(); this.RTB_MapSC = new System.Windows.Forms.RichTextBox(); this.tb_Map = new System.Windows.Forms.TabPage(); + this.B_Map = new System.Windows.Forms.Button(); this.tb_Dev = new System.Windows.Forms.TabPage(); this.L_DeComp = new System.Windows.Forms.Label(); this.RTB_CompressedScript = new System.Windows.Forms.RichTextBox(); @@ -166,7 +167,6 @@ private void InitializeComponent() this.B_DumpFurniture = new System.Windows.Forms.Button(); this.L_ZDPreview = new System.Windows.Forms.Label(); this.B_HLCMD = new System.Windows.Forms.Button(); - this.B_Map = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tb_ZoneData.SuspendLayout(); this.tb_OWSC.SuspendLayout(); @@ -1641,6 +1641,16 @@ private void InitializeComponent() this.tb_Map.Text = "Map Preview"; this.tb_Map.UseVisualStyleBackColor = true; // + // B_Map + // + this.B_Map.Location = new System.Drawing.Point(145, 165); + this.B_Map.Name = "B_Map"; + this.B_Map.Size = new System.Drawing.Size(190, 130); + this.B_Map.TabIndex = 420; + this.B_Map.Text = "Show Map"; + this.B_Map.UseVisualStyleBackColor = true; + this.B_Map.Click += new System.EventHandler(this.B_Map_Click); + // // tb_Dev // this.tb_Dev.Controls.Add(this.L_DeComp); @@ -1778,16 +1788,6 @@ private void InitializeComponent() this.B_HLCMD.UseVisualStyleBackColor = true; this.B_HLCMD.Click += new System.EventHandler(this.B_HLCMD_Click); // - // B_Map - // - this.B_Map.Location = new System.Drawing.Point(145, 165); - this.B_Map.Name = "B_Map"; - this.B_Map.Size = new System.Drawing.Size(190, 130); - this.B_Map.TabIndex = 420; - this.B_Map.Text = "Show Map"; - this.B_Map.UseVisualStyleBackColor = true; - this.B_Map.Click += new System.EventHandler(this.B_Map_Click); - // // OWSE // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1803,6 +1803,7 @@ private void InitializeComponent() this.Name = "OWSE"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Overworld Editor"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.closingForm); this.tabControl1.ResumeLayout(false); this.tb_ZoneData.ResumeLayout(false); this.tb_ZoneData.PerformLayout();