mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
- fixed losing focus after closing Find & Replace dialog when Edit Selection was used
- fixed bug where Edit Selection in Find & Replace dialog stayed disabled on search - now allowing 1x1 grid size
This commit is contained in:
parent
943a9f9f85
commit
73e41e7f9e
5 changed files with 16 additions and 13 deletions
|
@ -184,6 +184,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
this.resultslist.Size = new System.Drawing.Size(341, 203);
|
||||
this.resultslist.TabIndex = 9;
|
||||
this.resultslist.MouseUp += new System.Windows.Forms.MouseEventHandler(this.resultslist_MouseUp);
|
||||
this.resultslist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.resultslist_MouseDoubleClick);
|
||||
this.resultslist.SelectedIndexChanged += new System.EventHandler(this.resultslist_SelectedIndexChanged);
|
||||
//
|
||||
// resultscount
|
||||
|
|
|
@ -188,6 +188,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
resultslist.EndUpdate();
|
||||
suppressevents = false;
|
||||
|
||||
// Enable/disable buttons
|
||||
editbutton.Enabled = (resultslist.SelectedIndex > -1);
|
||||
deletebutton.Enabled = (resultslist.SelectedIndex > -1);
|
||||
|
||||
// Redraw the screen, this will show the selection
|
||||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
@ -226,7 +230,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
resultslist.SelectedIndices.Add(index);
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
// Edit selected objects
|
||||
editbutton_Click(this, EventArgs.Empty);
|
||||
}
|
||||
|
@ -237,6 +241,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
deletebutton.Enabled = (resultslist.SelectedIndex > -1);
|
||||
}
|
||||
|
||||
// Double clicked
|
||||
private void resultslist_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
resultslist_MouseUp(sender, new MouseEventArgs(MouseButtons.Right, 1, e.X, e.Y, e.Delta));
|
||||
}
|
||||
|
||||
// Window closing
|
||||
private void FindReplaceForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
|
@ -244,6 +254,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(e.CloseReason == CloseReason.UserClosing)
|
||||
{
|
||||
e.Cancel = true;
|
||||
General.Interface.Focus();
|
||||
General.Editing.CancelMode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,8 +233,8 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
[BeginAction("gridinc")]
|
||||
internal void IncreaseGrid()
|
||||
{
|
||||
// Not lower than 2
|
||||
if(gridsize >= 4)
|
||||
// Not lower than 1
|
||||
if(gridsize >= 2)
|
||||
{
|
||||
// Change grid
|
||||
SetGridSize(gridsize >> 1);
|
||||
|
|
2
Source/Windows/GridSetupForm.Designer.cs
generated
2
Source/Windows/GridSetupForm.Designer.cs
generated
|
@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
0,
|
||||
0});
|
||||
this.gridsize.Minimum = new decimal(new int[] {
|
||||
2,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
|
|
|
@ -132,15 +132,6 @@
|
|||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="gridsize.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
Loading…
Reference in a new issue