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

@ -394,11 +394,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// Make the highlight the selection
SelectSector(highlighted, true, false);
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
{
// Make the highlight the selection
SelectSector(highlighted, true, false);
}
}
}

View file

@ -223,11 +223,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedLinedefs(true).Count == 0) && (highlighted != null))
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// Make the highlight the selection
highlighted.Selected = true;
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedLinedefs(true).Count == 0) && (highlighted != null))
{
// Make the highlight the selection
highlighted.Selected = true;
}
}
}

View file

@ -443,11 +443,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// Make the highlight the selection
SelectSector(highlighted, true, false);
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
{
// Make the highlight the selection
SelectSector(highlighted, true, false);
}
}
}

View file

@ -110,11 +110,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedThings(true).Count == 0) && (highlighted != null))
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// Make the highlight the selection
highlighted.Selected = true;
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedThings(true).Count == 0) && (highlighted != null))
{
// Make the highlight the selection
highlighted.Selected = true;
}
}
}

View file

@ -104,11 +104,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedVertices(true).Count == 0) && (highlighted != null))
// Not pasting anything?
EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode);
if(!editmode.Pasting)
{
// Make the highlight the selection
highlighted.Selected = true;
// No selection made? But we have a highlight!
if((General.Map.Map.GetSelectedVertices(true).Count == 0) && (highlighted != null))
{
// Make the highlight the selection
highlighted.Selected = true;
}
}
}