added double-click on items in linedef action browser and sector effect browser to immediately select the item and close the dialog

This commit is contained in:
codeimp 2009-01-15 16:01:02 +00:00
parent e962759038
commit 1eb298aca5
6 changed files with 32 additions and 10 deletions

View file

@ -385,6 +385,7 @@ namespace CodeImp.DoomBuilder.Windows
this.actions.Name = "actions";
this.actions.Size = new System.Drawing.Size(379, 351);
this.actions.TabIndex = 0;
this.actions.DoubleClick += new System.EventHandler(this.actions_DoubleClick);
//
// tabs
//

View file

@ -260,5 +260,15 @@ namespace CodeImp.DoomBuilder.Windows
}
}
}
// Double clicking on item
private void actions_DoubleClick(object sender, EventArgs e)
{
// Action node selected?
if((actions.SelectedNode != null) && (actions.SelectedNode.Tag is LinedefActionInfo))
{
if(apply.Enabled) apply_Click(this, EventArgs.Empty);
}
}
}
}

View file

@ -153,12 +153,12 @@
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="category.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -168,12 +168,12 @@
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox2.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>
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="option7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -315,6 +315,7 @@ namespace CodeImp.DoomBuilder.Windows
this.effects.TabIndex = 0;
this.effects.UseCompatibleStateImageBehavior = false;
this.effects.View = System.Windows.Forms.View.Details;
this.effects.DoubleClick += new System.EventHandler(this.effects_DoubleClick);
//
// colnumber
//

View file

@ -179,5 +179,15 @@ namespace CodeImp.DoomBuilder.Windows
this.DialogResult = DialogResult.Cancel;
this.Close();
}
// Double-clicked on item
private void effects_DoubleClick(object sender, EventArgs e)
{
// Effect selected?
if((effects.SelectedItems.Count > 0) && (effects.SelectedItems[0].Tag is SectorEffectInfo))
{
if(apply.Enabled) apply_Click(this, EventArgs.Empty);
}
}
}
}

View file

@ -117,12 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="groupBox2.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>
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="option7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>