This commit is contained in:
codeimp 2007-12-29 17:10:49 +00:00
parent 9519e07093
commit fb31b9b8e0
4 changed files with 15 additions and 7 deletions

View file

@ -286,10 +286,7 @@ namespace CodeImp.DoomBuilder.Editing
if(selected.Count > 0)
{
// Show line edit dialog
LinedefEditForm f = new LinedefEditForm();
f.Setup(selected);
f.ShowDialog(General.MainWindow);
f.Dispose();
LinedefEditForm.EditLinedefs(General.MainWindow, selected);
// When a single line was selected, deselect it now
if(selected.Count == 1) General.Map.Map.ClearSelectedLinedefs();

View file

@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Interface
if(tabs.SelectedTab == tabactions)
{
// Action node selected?
if(actions.SelectedNode.Tag is LinedefActionInfo)
if((actions.SelectedNode != null) && (actions.SelectedNode.Tag is LinedefActionInfo))
{
// Our result
selectedaction = (actions.SelectedNode.Tag as LinedefActionInfo).Index;

View file

@ -715,7 +715,7 @@ namespace CodeImp.DoomBuilder.Interface
this.Opacity = 0;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Linedefs";
this.Text = "Edit Linedef";
this.actiongroup.ResumeLayout(false);
this.actiongroup.PerformLayout();
this.hexenpanel.ResumeLayout(false);

View file

@ -74,7 +74,8 @@ namespace CodeImp.DoomBuilder.Interface
// Keep this list
this.lines = lines;
if(lines.Count > 1) this.Text = "Edit Linedefs (" + lines.Count + ")";
////////////////////////////////////////////////////////////////////////
// Set all options to the first linedef properties
////////////////////////////////////////////////////////////////////////
@ -199,6 +200,16 @@ namespace CodeImp.DoomBuilder.Interface
}
}
}
// This shows the dialog to edit lines
public static void EditLinedefs(IWin32Window owner, ICollection<Linedef> lines)
{
// Show line edit dialog
LinedefEditForm f = new LinedefEditForm();
f.Setup(lines);
f.ShowDialog(owner);
f.Dispose();
}
// Front side (un)checked
private void frontside_CheckStateChanged(object sender, EventArgs e)