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

fix: enable atom type and master term remove functionality #1883

Closed
wants to merge 10 commits into from

Conversation

RobBuchananCompPhys
Copy link
Contributor

@RobBuchananCompPhys RobBuchananCompPhys commented Apr 24, 2024

Closes #1065, Closes #1874, Closes #1586

Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

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

Good start. However there are a couple of "propagation" mechanics to consider.

  1. When removing an AtomType we are currently being saved (or perhaps being obscured from problems...) by our use of std::shared_ptr both in the main vector of AtomTypes as well as any classes which need it. A bigger discussion which arises from this is "Should we really be using something like std::weak_ptr to store references to an AtomType? For now, those references must be nullified by extending the objectNoLongerValid and removeReferenceTo template functions (see CoreData).
  2. Removing a master term suffers from a similar problem to the AtomType, but when removed we should simply convert any uses into Species-local definitions (i.e. copy the data into a new SpeciesBond etc.)

Seems that there's a fair bit more work here than anticipated!

@RobBuchananCompPhys RobBuchananCompPhys changed the title enable atom type and master term remove buttons, connect fix: enable atom type and master term remove functionality Apr 29, 2024
@RobBuchananCompPhys RobBuchananCompPhys marked this pull request as ready for review April 30, 2024 08:37
src/classes/coreData.cpp Outdated Show resolved Hide resolved
src/classes/coreData.cpp Outdated Show resolved Hide resolved
src/gui/forcefieldTab.cpp Outdated Show resolved Hide resolved
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.

Cannot delete Atom Type and Master Terms Cannot remove Atom Types Remove Master Terms from GUI
2 participants