mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-12 23:54:10 +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
f8fbcbcd1f
commit
914fb7ea34
3 changed files with 36 additions and 19 deletions
|
@ -1009,23 +1009,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// toggle selected state
|
// toggle selected state
|
||||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||||
{
|
{
|
||||||
this.selected = true;
|
if (!selected)
|
||||||
mode.AddSelectedObject(this);
|
{
|
||||||
|
selected = true;
|
||||||
|
mode.AddSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (General.Interface.CtrlState)
|
else if (General.Interface.CtrlState)
|
||||||
{
|
{
|
||||||
this.selected = false;
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
{
|
||||||
|
selected = false;
|
||||||
|
mode.RemoveSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.selected)
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
mode.RemoveSelectedObject(this);
|
||||||
else
|
else
|
||||||
mode.AddSelectedObject(this);
|
mode.AddSelectedObject(this);
|
||||||
|
|
||||||
this.selected = !this.selected;
|
selected = !selected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1580,22 +1580,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// toggle selected state
|
// toggle selected state
|
||||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||||
{
|
{
|
||||||
this.selected = true;
|
if (!selected)
|
||||||
mode.AddSelectedObject(this);
|
{
|
||||||
|
selected = true;
|
||||||
|
mode.AddSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (General.Interface.CtrlState)
|
else if (General.Interface.CtrlState)
|
||||||
{
|
{
|
||||||
this.selected = false;
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
{
|
||||||
|
selected = false;
|
||||||
|
mode.RemoveSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.selected)
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
mode.RemoveSelectedObject(this);
|
||||||
else
|
else
|
||||||
mode.AddSelectedObject(this);
|
mode.AddSelectedObject(this);
|
||||||
|
|
||||||
this.selected = !this.selected;
|
selected = !selected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -931,22 +931,28 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// toggle selected state
|
// toggle selected state
|
||||||
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect)
|
||||||
{
|
{
|
||||||
this.selected = true;
|
if (!selected)
|
||||||
mode.AddSelectedObject(this);
|
{
|
||||||
|
selected = true;
|
||||||
|
mode.AddSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (General.Interface.CtrlState)
|
else if (General.Interface.CtrlState)
|
||||||
{
|
{
|
||||||
this.selected = false;
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
{
|
||||||
|
selected = false;
|
||||||
|
mode.RemoveSelectedObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.selected)
|
if (selected)
|
||||||
mode.RemoveSelectedObject(this);
|
mode.RemoveSelectedObject(this);
|
||||||
else
|
else
|
||||||
mode.AddSelectedObject(this);
|
mode.AddSelectedObject(this);
|
||||||
|
|
||||||
this.selected = !this.selected;
|
selected = !selected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue