{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/934","repository_url":"https://api.github.com/repos/OpenMW/openmw","labels_url":"https://api.github.com/repos/OpenMW/openmw/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/OpenMW/openmw/issues/934/comments","events_url":"https://api.github.com/repos/OpenMW/openmw/issues/934/events","html_url":"https://github.com/OpenMW/openmw/pull/934","id":152538497,"number":934,"title":"Editor: Prevent duplicate pathgrids (Bug #3342)","user":{"login":"rcutmore","id":873661,"avatar_url":"https://avatars.githubusercontent.com/u/873661?v=3","gravatar_id":"","url":"https://api.github.com/users/rcutmore","html_url":"https://github.com/rcutmore","followers_url":"https://api.github.com/users/rcutmore/followers","following_url":"https://api.github.com/users/rcutmore/following{/other_user}","gists_url":"https://api.github.com/users/rcutmore/gists{/gist_id}","starred_url":"https://api.github.com/users/rcutmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcutmore/subscriptions","organizations_url":"https://api.github.com/users/rcutmore/orgs","repos_url":"https://api.github.com/users/rcutmore/repos","events_url":"https://api.github.com/users/rcutmore/events{/privacy}","received_events_url":"https://api.github.com/users/rcutmore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-02T11:49:11Z","updated_at":"2016-05-03T11:33:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenMW/openmw/pulls/934","html_url":"https://github.com/OpenMW/openmw/pull/934","diff_url":"https://github.com/OpenMW/openmw/pull/934.diff","patch_url":"https://github.com/OpenMW/openmw/pull/934.patch"},"body":"This updates *CSMWorld::Data::hasId* to include pathgrids, preventing duplicates from being entered with the editor. Related issue on bug tracker: [Editor: You can create pathgrids with the same ID](http://bugs.openmw.org/issues/3342).\r\n\r\nUnrelated to this bug, I noticed pathgrids aren't being included in [CSMWorld::Data::getIds](https://github.com/OpenMW/openmw/blob/24ae9f4ac1cdcd74e702ec8f09ccc45a8542b484/apps/opencs/model/world/data.cpp#L1162). Maybe that method should be updated as well? I haven't had a chance to look into it much yet but it's used in [CSMWorld::ScriptContext::isId](https://github.com/OpenMW/openmw/blob/24ae9f4ac1cdcd74e702ec8f09ccc45a8542b484/apps/opencs/model/world/scriptcontext.cpp#L94) and [CSMWorld::RefIdCollection::getIds](https://github.com/OpenMW/openmw/blob/24ae9f4ac1cdcd74e702ec8f09ccc45a8542b484/apps/opencs/model/world/refidcollection.cpp#L850)"},"comment":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/comments/216501814","html_url":"https://github.com/OpenMW/openmw/pull/934#issuecomment-216501814","issue_url":"https://api.github.com/repos/OpenMW/openmw/issues/934","id":216501814,"user":{"login":"rcutmore","id":873661,"avatar_url":"https://avatars.githubusercontent.com/u/873661?v=3","gravatar_id":"","url":"https://api.github.com/users/rcutmore","html_url":"https://github.com/rcutmore","followers_url":"https://api.github.com/users/rcutmore/followers","following_url":"https://api.github.com/users/rcutmore/following{/other_user}","gists_url":"https://api.github.com/users/rcutmore/gists{/gist_id}","starred_url":"https://api.github.com/users/rcutmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcutmore/subscriptions","organizations_url":"https://api.github.com/users/rcutmore/orgs","repos_url":"https://api.github.com/users/rcutmore/repos","events_url":"https://api.github.com/users/rcutmore/events{/privacy}","received_events_url":"https://api.github.com/users/rcutmore/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T11:33:51Z","updated_at":"2016-05-03T11:33:51Z","body":"I updated this to include a separate PathgridCreator class for detecting duplicate IDs. When you get a chance let me know if I'm missing anything."}}