Fixed drag-to-copy for path nodes; update node vertex box position when dragging; block drag-to-copy multi-selected path nodes (which does not work, it only copies the first one)

This commit is contained in:
PNWParksFan 2021-11-27 22:55:55 -08:00
parent f808c095c1
commit a32cc82ce9
2 changed files with 13 additions and 3 deletions

View File

@ -1365,7 +1365,7 @@ namespace CodeWalker
} }
foreach (var kvp in pathYnds) foreach (var kvp in pathYnds)
{ {
wf.UpdatePathYndGraphics(kvp.Key, true); wf.UpdatePathYndGraphics(kvp.Key, false);
} }
foreach (var kvp in navYnvs) foreach (var kvp in navYnvs)
{ {
@ -1399,7 +1399,7 @@ namespace CodeWalker
{ {
if (PathNode != null) if (PathNode != null)
{ {
wf.UpdatePathYndGraphics(PathNode.Ynd, true); wf.UpdatePathYndGraphics(PathNode.Ynd, false);
} }
if (NavPoly != null) if (NavPoly != null)
{ {

View File

@ -1860,6 +1860,7 @@ namespace CodeWalker
} }
else else
{ {
ynd.UpdateAllNodePositions();
space.BuildYndVerts(ynd); space.BuildYndVerts(ynd);
} }
//lock (Renderer.RenderSyncRoot) //lock (Renderer.RenderSyncRoot)
@ -5871,7 +5872,16 @@ namespace CodeWalker
GrabbedWidget.IsDragging = true; GrabbedWidget.IsDragging = true;
if (Input.ShiftPressed) if (Input.ShiftPressed)
{ {
CloneItem(); var ms = CurrentMapSelection.MultipleSelectionItems;
if (ms?.Length > 0 && ms[0].PathNode != null)
{
MessageBox.Show("You cannot clone multiple path nodes at once", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
GrabbedWidget.IsDragging = false;
GrabbedWidget = null;
} else
{
CloneItem();
}
} }
MarkUndoStart(GrabbedWidget); MarkUndoStart(GrabbedWidget);
} }