{"action":"created","issue":{"url":"https://api.github.com/repos/BALL-Project/ball/issues/263","labels_url":"https://api.github.com/repos/BALL-Project/ball/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/BALL-Project/ball/issues/263/comments","events_url":"https://api.github.com/repos/BALL-Project/ball/issues/263/events","html_url":"https://github.com/BALL-Project/ball/issues/263","id":58300082,"number":263,"title":"Copying removes composites from parent","user":{"login":"anhi","id":1349738,"avatar_url":"https://avatars.githubusercontent.com/u/1349738?v=3","gravatar_id":"","url":"https://api.github.com/users/anhi","html_url":"https://github.com/anhi","followers_url":"https://api.github.com/users/anhi/followers","following_url":"https://api.github.com/users/anhi/following{/other_user}","gists_url":"https://api.github.com/users/anhi/gists{/gist_id}","starred_url":"https://api.github.com/users/anhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhi/subscriptions","organizations_url":"https://api.github.com/users/anhi/orgs","repos_url":"https://api.github.com/users/anhi/repos","events_url":"https://api.github.com/users/anhi/events{/privacy}","received_events_url":"https://api.github.com/users/anhi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BALL-Project/ball/labels/C:%20BALL%20Core","name":"C: BALL Core","color":"0000aa"},{"url":"https://api.github.com/repos/BALL-Project/ball/labels/P:%20major","name":"P: major","color":"f6f6f6"},{"url":"https://api.github.com/repos/BALL-Project/ball/labels/T:%20defect","name":"T: defect","color":"cccccc"}],"state":"open","locked":false,"assignee":{"login":"anhi","id":1349738,"avatar_url":"https://avatars.githubusercontent.com/u/1349738?v=3","gravatar_id":"","url":"https://api.github.com/users/anhi","html_url":"https://github.com/anhi","followers_url":"https://api.github.com/users/anhi/followers","following_url":"https://api.github.com/users/anhi/following{/other_user}","gists_url":"https://api.github.com/users/anhi/gists{/gist_id}","starred_url":"https://api.github.com/users/anhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhi/subscriptions","organizations_url":"https://api.github.com/users/anhi/orgs","repos_url":"https://api.github.com/users/anhi/repos","events_url":"https://api.github.com/users/anhi/events{/privacy}","received_events_url":"https://api.github.com/users/anhi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/BALL-Project/ball/milestones/2","labels_url":"https://api.github.com/repos/BALL-Project/ball/milestones/2/labels","id":987572,"number":2,"title":"BALL 2.0","description":"Next major version of BALL. Temporarily a synonym for (distant) future.","creator":{"login":"anhi","id":1349738,"avatar_url":"https://avatars.githubusercontent.com/u/1349738?v=3","gravatar_id":"","url":"https://api.github.com/users/anhi","html_url":"https://github.com/anhi","followers_url":"https://api.github.com/users/anhi/followers","following_url":"https://api.github.com/users/anhi/following{/other_user}","gists_url":"https://api.github.com/users/anhi/gists{/gist_id}","starred_url":"https://api.github.com/users/anhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhi/subscriptions","organizations_url":"https://api.github.com/users/anhi/orgs","repos_url":"https://api.github.com/users/anhi/repos","events_url":"https://api.github.com/users/anhi/events{/privacy}","received_events_url":"https://api.github.com/users/anhi/received_events","type":"User","site_admin":false},"open_issues":70,"closed_issues":32,"state":"open","created_at":"2015-02-19T22:57:11Z","updated_at":"2015-02-20T04:06:28Z","due_on":"1970-01-01T00:00:00Z","closed_at":null},"comments":6,"created_at":"2015-02-20T01:46:53Z","updated_at":"2015-02-20T06:21:46Z","closed_at":null,"body":"**Reported by Marcel on 17 Feb 39834598 13:20 UTC**\nIf some composite (Atom, Molecule, etc.) is copied, it is automatically removed from its parent.\n\nHere is a tiny example:\n```cpp\n\tMolecule mol;\n\tAtom* atom1 = new Atom;\n\tmol.insert(*atom1);\n\n\tAtom atom2;\n\t*atom1 = atom2; // copy atom\n\tcout<<\"molecule has \"<<mol.countAtoms()<<\" atoms\"<<endl;\n\n\n\tSystem sys;\n\tsys.insert(mol);\n\n\tMolecule mol2;\n\tmol=mol2;  // copy molecule\n\tcout<<\"system has \"<<sys.countMolecules()<<\" molecules\"<<endl;\n```\n\nOutput for this example will tell you that 'mol' has zero atoms and 'sys' has zero molecules.\n\nDoes anyone know if this was really ever intended?! And if yes, what should this behavior be good for?? ;-)\nNormally a copy operator should not interfere with the object's parent (but only copy the 'content' of the atom/molecule etc.), so that the user will definitly not expect the strange effect shown here!"},"comment":{"url":"https://api.github.com/repos/BALL-Project/ball/issues/comments/75195076","html_url":"https://github.com/BALL-Project/ball/issues/263#issuecomment-75195076","issue_url":"https://api.github.com/repos/BALL-Project/ball/issues/263","id":75195076,"user":{"login":"anhi","id":1349738,"avatar_url":"https://avatars.githubusercontent.com/u/1349738?v=3","gravatar_id":"","url":"https://api.github.com/users/anhi","html_url":"https://github.com/anhi","followers_url":"https://api.github.com/users/anhi/followers","following_url":"https://api.github.com/users/anhi/following{/other_user}","gists_url":"https://api.github.com/users/anhi/gists{/gist_id}","starred_url":"https://api.github.com/users/anhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhi/subscriptions","organizations_url":"https://api.github.com/users/anhi/orgs","repos_url":"https://api.github.com/users/anhi/repos","events_url":"https://api.github.com/users/anhi/events{/privacy}","received_events_url":"https://api.github.com/users/anhi/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T06:21:46Z","updated_at":"2015-02-20T06:21:46Z","body":"**Commented by akdehof on 15 May 40940482 04:58 UTC**\nThe best option seems to be to make the operator = () private... This will break compilation of potentially large amounts of code, so we should do this in a release that is not backward compatible anyhow... (BALL 2.0?)"}}