Get dragging of one item to work through the ActionClass

This commit is contained in:
Tim Young 2018-05-04 12:03:06 -05:00
parent 51087c1119
commit 90788964c9
2 changed files with 8 additions and 3 deletions

View File

@ -127,7 +127,11 @@ namespace EduNetworkBuilder
case NBAction.changedevice: case NBAction.changedevice:
break; break;
case NBAction.changelocation: case NBAction.changelocation:
if (source != null) source.ChangeLocation(Location); if (source != null)
{
source.ChangeLocation(Location);
source.UnHide(); //In case it was hidden
}
break; break;
case NBAction.deletecomponent: case NBAction.deletecomponent:
break; break;

View File

@ -1742,8 +1742,9 @@ namespace EduNetworkBuilder
{ {
if (!ItemClickedOn.IsLockedInLocation()) if (!ItemClickedOn.IsLockedInLocation())
{ {
ItemClickedOn.ChangeLocation(CenteredLocation); //ItemClickedOn.ChangeLocation(CenteredLocation);
ItemClickedOn.UnHide(); //If it was hidden, unhide it //ItemClickedOn.UnHide(); //If it was hidden, unhide it
NB.DoActionMoveDevice(ItemClickedOn.GetUniqueIdentifier, CenteredLocation);
UpdateLinks(); UpdateLinks();
UpdateVisuals(); UpdateVisuals();
} }