{"action":"created","comment":{"url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/comments/59520241","id":59520241,"diff_hunk":"@@ -363,16 +485,39 @@ def add_objects(self, layer, features):\n \r\n         # get attribute information from selected layers\r\n         items = []\r\n+        existing_items = [\"%s_%s\"%(item.object_type.value,\r\n+                                   str(item.object_id.value))\r\n+                for item in self.model.rows]\r\n         for feature in features:\r\n-            item = {\r\n-                'object_type': layer.name(),\r\n-                'object_id': feature['id'],\r\n-                'object_name': feature['display_name'],\r\n-                'file_path': filename\r\n-            }\r\n-            items.append(item)\r\n+            #check if object not already exist\r\n+\r\n+            if (layer.name() + '_' + str(feature['id'])) not in existing_items:\r\n+                item = {\r\n+                    'object_type': layer.name(),\r\n+                    'object_id': feature['id'],\r\n+                    'object_name': feature['display_name'],\r\n+                    'file_path': filename\r\n+                }\r\n+                items.append(item)\r\n+\r\n+        if len(items) > 20:\r\n+            msg = \"%i nieuwe objecten zijn geselecteerd. Toevoegen aan de \" \\\r\n+                  \"grafiek kan enkele tijd duren. Wilt u doorgaan?\"%len(items)\r","path":"views/graph.py","position":442,"original_position":442,"commit_id":"9db507ef0916a2e742dd5f8d9bcaaea933812183","original_commit_id":"9db507ef0916a2e742dd5f8d9bcaaea933812183","user":{"login":"reinout","id":121433,"avatar_url":"https://avatars.githubusercontent.com/u/121433?v=3","gravatar_id":"","url":"https://api.github.com/users/reinout","html_url":"https://github.com/reinout","followers_url":"https://api.github.com/users/reinout/followers","following_url":"https://api.github.com/users/reinout/following{/other_user}","gists_url":"https://api.github.com/users/reinout/gists{/gist_id}","starred_url":"https://api.github.com/users/reinout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinout/subscriptions","organizations_url":"https://api.github.com/users/reinout/orgs","repos_url":"https://api.github.com/users/reinout/repos","events_url":"https://api.github.com/users/reinout/events{/privacy}","received_events_url":"https://api.github.com/users/reinout/received_events","type":"User","site_admin":false},"body":"spaties om de `%`","created_at":"2016-04-13T09:42:26Z","updated_at":"2016-04-13T09:42:26Z","html_url":"https://github.com/nens/threedi-qgis-plugin/pull/13#discussion_r59520241","pull_request_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/comments/59520241"},"html":{"href":"https://github.com/nens/threedi-qgis-plugin/pull/13#discussion_r59520241"},"pull_request":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13","id":66289370,"html_url":"https://github.com/nens/threedi-qgis-plugin/pull/13","diff_url":"https://github.com/nens/threedi-qgis-plugin/pull/13.diff","patch_url":"https://github.com/nens/threedi-qgis-plugin/pull/13.patch","issue_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/13","number":13,"state":"open","locked":false,"title":"Layout improvements pep8","user":{"login":"bastiaan-roos","id":1068991,"avatar_url":"https://avatars.githubusercontent.com/u/1068991?v=3","gravatar_id":"","url":"https://api.github.com/users/bastiaan-roos","html_url":"https://github.com/bastiaan-roos","followers_url":"https://api.github.com/users/bastiaan-roos/followers","following_url":"https://api.github.com/users/bastiaan-roos/following{/other_user}","gists_url":"https://api.github.com/users/bastiaan-roos/gists{/gist_id}","starred_url":"https://api.github.com/users/bastiaan-roos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastiaan-roos/subscriptions","organizations_url":"https://api.github.com/users/bastiaan-roos/orgs","repos_url":"https://api.github.com/users/bastiaan-roos/repos","events_url":"https://api.github.com/users/bastiaan-roos/events{/privacy}","received_events_url":"https://api.github.com/users/bastiaan-roos/received_events","type":"User","site_admin":false},"body":"- only add unique locations to graph\r\n- warn when adding many locations to the graph at once\r\n- improved color selection of graphs\r\n- add support of multiple result data sources\r\n- add selectable layers to map on selection of model datasource\r\n- minor bug fixing\r\n- new icon for datasource selection\r\n- removed unused qt files\r\n- Pep8  styling and docstrings","created_at":"2016-04-13T09:19:30Z","updated_at":"2016-04-13T09:42:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"768d269ef758242d803af014b774f386716cf58b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13/commits","review_comments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13/comments","review_comment_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/13/comments","statuses_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/statuses/9db507ef0916a2e742dd5f8d9bcaaea933812183","head":{"label":"nens:layout-improvements-pep8","ref":"layout-improvements-pep8","sha":"9db507ef0916a2e742dd5f8d9bcaaea933812183","user":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"repo":{"id":55498704,"name":"threedi-qgis-plugin","full_name":"nens/threedi-qgis-plugin","owner":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nens/threedi-qgis-plugin","description":"Plugins for working with 3di models in QGIS","fork":false,"url":"https://api.github.com/repos/nens/threedi-qgis-plugin","forks_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/forks","keys_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/teams","hooks_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/hooks","issue_events_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/events","assignees_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/tags","blobs_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/languages","stargazers_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/stargazers","contributors_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/contributors","subscribers_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/subscribers","subscription_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/subscription","commits_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/merges","archive_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/downloads","issues_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/labels{/name}","releases_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/deployments","created_at":"2016-04-05T10:25:10Z","updated_at":"2016-04-05T15:34:32Z","pushed_at":"2016-04-13T09:26:45Z","git_url":"git://github.com/nens/threedi-qgis-plugin.git","ssh_url":"git@github.com:nens/threedi-qgis-plugin.git","clone_url":"https://github.com/nens/threedi-qgis-plugin.git","svn_url":"https://github.com/nens/threedi-qgis-plugin","homepage":null,"size":3239,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"nens:master","ref":"master","sha":"452487d168955c51b8255486a969b550bdb03964","user":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"repo":{"id":55498704,"name":"threedi-qgis-plugin","full_name":"nens/threedi-qgis-plugin","owner":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nens/threedi-qgis-plugin","description":"Plugins for working with 3di models in QGIS","fork":false,"url":"https://api.github.com/repos/nens/threedi-qgis-plugin","forks_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/forks","keys_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/teams","hooks_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/hooks","issue_events_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/events","assignees_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/tags","blobs_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/languages","stargazers_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/stargazers","contributors_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/contributors","subscribers_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/subscribers","subscription_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/subscription","commits_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/merges","archive_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/downloads","issues_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/labels{/name}","releases_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/nens/threedi-qgis-plugin/deployments","created_at":"2016-04-05T10:25:10Z","updated_at":"2016-04-05T15:34:32Z","pushed_at":"2016-04-13T09:26:45Z","git_url":"git://github.com/nens/threedi-qgis-plugin.git","ssh_url":"git@github.com:nens/threedi-qgis-plugin.git","clone_url":"https://github.com/nens/threedi-qgis-plugin.git","svn_url":"https://github.com/nens/threedi-qgis-plugin","homepage":null,"size":3239,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13"},"html":{"href":"https://github.com/nens/threedi-qgis-plugin/pull/13"},"issue":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/13"},"comments":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/nens/threedi-qgis-plugin/statuses/9db507ef0916a2e742dd5f8d9bcaaea933812183"}}}}