Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2175 renaming expression profile #2177

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

msevestre
Copy link
Member

No description provided.

@msevestre msevestre requested a review from Yuri05 April 6, 2022 16:25
Copy link
Member Author

@msevestre msevestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should fix the issue
@Yuri05 I could not reproduce the problem with Pgp stuff. So LEt's merge and try again?

_entity.Name = _newName;
renameBuildingBlockTask.RenameBuildingBlock(entityAsBuildingBlock, _oldName);
//Renaming the building block is performed in a special task
renameBuildingBlockTask.RenameBuildingBlock(entityAsBuildingBlock, _newName);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was weird here. Everything was renamed here. So I am doing it like in the Simulation and moving the logic outside of the comand

var individual = _simulationSubject.Individual;

//This needs to be retrieved before performing base operation to ensure that we capture all containers before they are renamed
var allMoleculeContainers = individual.GetAllChildren<IContainer>(x => x.IsNamed(_oldMoleculeName));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removing also the molecule and not the container.

@@ -42,7 +42,12 @@ public override string Name
set
{
if (string.Equals(Name, value))
{
//Even if the name has not changed, we raise the even here as the underlying composite name may have changed
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is key to see the Node update on the right. Otherwise, because we have composite names, the name has changed already when the molecule was renamed

@msevestre msevestre merged commit 661549d into develop Apr 6, 2022
@msevestre msevestre deleted the 2175-renaming-expression-profile-corrupts branch April 6, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants