Skip to content

Commit

Permalink
Added support for copy/paste DefinedByBase instances
Browse files Browse the repository at this point in the history
fixes #1303
  • Loading branch information
vchelaru committed Jan 9, 2024
1 parent e75038b commit 092799b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,11 @@ await TaskManager.Self.AddAsync(() =>
//// moving to another element, so let's copy
NamedObjectSave newNos = originalNos.Clone();

// In case this is defined in base, we want to still allow copying it, but mark it
// as not defined by base:
newNos.DefinedByBase = false;
newNos.InstantiatedByBase = false;

UpdateNosAttachmentAfterDragDrop(newNos, targetElement);

//clonedNos.InstanceName = IncrementNumberAtEndOfNewObject(elementMovingInto, clonedNos.InstanceName);
Expand Down Expand Up @@ -1969,11 +1974,6 @@ await TaskManager.Self.AddAsync(() =>
targetElement.NamedObjects.Remove(newNos);
}
}
if (succeeded && originalNos.DefinedByBase)
{
succeeded = false;
generalResponse.Message = $"Could not copy {originalNos.InstanceName} because it is defined by base. Select the object in the base screen/entity to copy it";
}

if (succeeded)
{
Expand Down

0 comments on commit 092799b

Please sign in to comment.