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:
break;
case NBAction.changelocation:
if (source != null) source.ChangeLocation(Location);
if (source != null)
{
source.ChangeLocation(Location);
source.UnHide(); //In case it was hidden
}
break;
case NBAction.deletecomponent:
break;

View File

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