Fixed bug that caused highlighted objects to join pasted objects in the Edit Selection Mode

This commit is contained in:
codeimp 2009-08-19 11:42:20 +00:00
parent 07b82ce082
commit b1c23198d9
5 changed files with 45 additions and 20 deletions

View file

@ -393,6 +393,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
@ -401,6 +405,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
SelectSector(highlighted, true, false);
}
}
}
// Hide highlight info
General.Interface.HideInfo();

View file

@ -222,6 +222,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedLinedefs(true).Count == 0) && (highlighted != null))
@ -230,6 +234,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
highlighted.Selected = true;
}
}
}
// Hide highlight info
General.Interface.HideInfo();

View file

@ -442,6 +442,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
@ -450,6 +454,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
SelectSector(highlighted, true, false);
}
}
}
// Hide highlight info
General.Interface.HideInfo();

View file

@ -109,6 +109,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedThings(true).Count == 0) && (highlighted != null))
@ -117,6 +121,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
highlighted.Selected = true;
}
}
}
// Hide highlight info
General.Interface.HideInfo();

View file

@ -103,6 +103,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedVertices(true).Count == 0) && (highlighted != null))
@ -111,6 +115,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
highlighted.Selected = true;
}
}
}
// Hide highlight info
General.Interface.HideInfo();