mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-04-22 09:31:14 +00:00
Fixed an issue where selected objects were unnecessarily cleared in visual mode, resulting in slowdowns. Partly addresses #337.
This commit is contained in:
parent
330ab8d367
commit
35da8fee2c
1 changed files with 12 additions and 7 deletions
|
@ -252,16 +252,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void PreAction(int multiselectionundogroup)
|
||||
{
|
||||
actionresult = new VisualActionResult();
|
||||
|
||||
|
||||
PickTargetUnlocked();
|
||||
|
||||
|
||||
// If the action is not performed on a selected object, clear the
|
||||
// current selection and make a temporary selection for the target.
|
||||
if((target.picked != null) && !target.picked.Selected && (BuilderPlug.Me.VisualModeClearSelection || (selectedobjects.Count == 0)))
|
||||
if ((target.picked != null) && !target.picked.Selected && (BuilderPlug.Me.VisualModeClearSelection || (selectedobjects.Count == 0)))
|
||||
{
|
||||
// Single object, no selection
|
||||
singleselection = true;
|
||||
ClearSelection();
|
||||
|
||||
// Only clear the selection if anything is selected, since it can be very time consuming on huge maps
|
||||
if(BuilderPlug.Me.VisualModeClearSelection && selectedobjects.Count > 0)
|
||||
ClearSelection();
|
||||
|
||||
undocreated = false;
|
||||
}
|
||||
else
|
||||
|
@ -313,8 +317,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
selectionchanged = false;
|
||||
|
||||
if(singleselection) ClearSelection();
|
||||
|
||||
// Only clear the selection if anything is selected, since it can be very time consuming on huge maps
|
||||
if (singleselection && selectedobjects.Count > 0) ClearSelection();
|
||||
|
||||
UpdateChangedObjects();
|
||||
ShowTargetInfo();
|
||||
|
@ -2233,7 +2238,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//mxd
|
||||
if (displaystatus)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Selection, string.Empty);
|
||||
General.Interface.DisplayStatus(StatusType.Selection, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue