mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +00:00
Fixed a bug where map elements could be selected multiple times when paint selecting in visual mode. Fixes #519. Fixes #520
This commit is contained in:
parent
4f9111d075
commit
d65fb7bbab
3 changed files with 36 additions and 19 deletions
|
@ -1001,23 +1001,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toggle selected state
|
||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||
{
|
||||
this.selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
if (!selected)
|
||||
{
|
||||
selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else if (General.Interface.CtrlState)
|
||||
{
|
||||
this.selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
|
||||
if (selected)
|
||||
{
|
||||
selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.selected)
|
||||
if (selected)
|
||||
mode.RemoveSelectedObject(this);
|
||||
else
|
||||
mode.AddSelectedObject(this);
|
||||
|
||||
this.selected = !this.selected;
|
||||
selected = !selected;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1716,22 +1716,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toggle selected state
|
||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||
{
|
||||
this.selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
if (!selected)
|
||||
{
|
||||
selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else if (General.Interface.CtrlState)
|
||||
{
|
||||
this.selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
if (selected)
|
||||
{
|
||||
selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.selected)
|
||||
if (selected)
|
||||
mode.RemoveSelectedObject(this);
|
||||
else
|
||||
mode.AddSelectedObject(this);
|
||||
|
||||
this.selected = !this.selected;
|
||||
selected = !selected;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -908,22 +908,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// toggle selected state
|
||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||
{
|
||||
this.selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
if (!selected)
|
||||
{
|
||||
selected = true;
|
||||
mode.AddSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else if (General.Interface.CtrlState)
|
||||
{
|
||||
this.selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
if (selected)
|
||||
{
|
||||
selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.selected)
|
||||
if (selected)
|
||||
mode.RemoveSelectedObject(this);
|
||||
else
|
||||
mode.AddSelectedObject(this);
|
||||
|
||||
this.selected = !this.selected;
|
||||
selected = !selected;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue