Fixed a bug with the combination of "Additive select without shift" and "Automatic clear selection" behavior

This commit is contained in:
codeimp 2009-08-19 11:09:10 +00:00
parent 907669a1c9
commit 07b82ce082
5 changed files with 36 additions and 10 deletions

View file

@ -591,8 +591,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called wheh selection ends
protected override void OnEndMultiSelection()
{
if(BuilderPlug.Me.AutoClearSelection ||
((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)))
bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f));
if(BuilderPlug.Me.AutoClearSelection && !selectionvolume)
{
General.Map.Map.ClearSelectedLinedefs();
General.Map.Map.ClearSelectedSectors();
}
if(selectionvolume)
{
if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect)
{

View file

@ -453,8 +453,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called wheh selection ends
protected override void OnEndMultiSelection()
{
if(BuilderPlug.Me.AutoClearSelection ||
((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)))
bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f));
if(BuilderPlug.Me.AutoClearSelection && !selectionvolume)
General.Map.Map.ClearSelectedLinedefs();
if(selectionvolume)
{
if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect)
{

View file

@ -714,8 +714,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called wheh selection ends
protected override void OnEndMultiSelection()
{
if(BuilderPlug.Me.AutoClearSelection ||
((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)))
bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f));
if(BuilderPlug.Me.AutoClearSelection && !selectionvolume)
{
General.Map.Map.ClearSelectedLinedefs();
General.Map.Map.ClearSelectedSectors();
}
if(selectionvolume)
{
if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect)
{

View file

@ -440,8 +440,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called wheh selection ends
protected override void OnEndMultiSelection()
{
if(BuilderPlug.Me.AutoClearSelection ||
((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)))
bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f));
if(BuilderPlug.Me.AutoClearSelection && !selectionvolume)
General.Map.Map.ClearSelectedThings();
if(selectionvolume)
{
if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect)
{

View file

@ -407,8 +407,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called wheh selection ends
protected override void OnEndMultiSelection()
{
if(BuilderPlug.Me.AutoClearSelection ||
((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)))
bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f));
if(BuilderPlug.Me.AutoClearSelection && !selectionvolume)
General.Map.Map.ClearSelectedVertices();
if(selectionvolume)
{
if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect)
{