{"action":"created","comment":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/comments/49271356","id":49271356,"diff_hunk":"@@ -186,17 +186,22 @@ bool QgsGeometryGeneratorSymbolLayerV2::isCompatibleWithSymbol( QgsSymbolV2* sym\n   Q_UNUSED( symbol )\n   return true;\n }\n-\n void QgsGeometryGeneratorSymbolLayerV2::render( QgsSymbolV2RenderContext& context )\n {\n-  QgsGeometry geom = mExpression->evaluate( &context.renderContext().expressionContext() ).value<QgsGeometry>();\n   if ( context.feature() )\n   {\n-    QgsFeature f = *context.feature();\n+    QgsExpressionContext& expressionContext = context.renderContext().expressionContext();\n+\n+    QgsFeature f = expressionContext.feature();","path":"src/core/symbology-ng/qgsgeometrygeneratorsymbollayerv2.cpp","position":13,"original_position":13,"commit_id":"31584dbbfe2dddb9c0ae9ded2f002746a3533985","original_commit_id":"31584dbbfe2dddb9c0ae9ded2f002746a3533985","user":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"body":"The original `QgsFeature f = *context.feature();` would be faster, is there any particular reason for this change?","created_at":"2016-01-10T04:10:32Z","updated_at":"2016-01-10T04:10:32Z","html_url":"https://github.com/qgis/QGIS/pull/2651#discussion_r49271356","pull_request_url":"https://api.github.com/repos/qgis/QGIS/pulls/2651","_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments/49271356"},"html":{"href":"https://github.com/qgis/QGIS/pull/2651#discussion_r49271356"},"pull_request":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2651"}}},"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/2651","id":55459982,"html_url":"https://github.com/qgis/QGIS/pull/2651","diff_url":"https://github.com/qgis/QGIS/pull/2651.diff","patch_url":"https://github.com/qgis/QGIS/pull/2651.patch","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/2651","number":2651,"state":"open","locked":false,"title":"Expression variable for the currently rendered part","user":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"body":"During rendering, two new variables will be available:\r\n\r\n  * `geometry_part_count`\r\n  * `geometry_part_num` (1-based index)\r\n\r\nUseful to apply different styles to different parts of multipart features","created_at":"2016-01-08T13:12:56Z","updated_at":"2016-01-10T04:10:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9ffbe5f557335db222d7cf08075fc27d0bd3b13","assignee":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/qgis/QGIS/pulls/2651/commits","review_comments_url":"https://api.github.com/repos/qgis/QGIS/pulls/2651/comments","review_comment_url":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/2651/comments","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/31584dbbfe2dddb9c0ae9ded2f002746a3533985","head":{"label":"m-kuhn:renderpart","ref":"renderpart","sha":"31584dbbfe2dddb9c0ae9ded2f002746a3533985","user":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"repo":{"id":5270567,"name":"QGIS","full_name":"m-kuhn/QGIS","owner":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m-kuhn/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":true,"url":"https://api.github.com/repos/m-kuhn/QGIS","forks_url":"https://api.github.com/repos/m-kuhn/QGIS/forks","keys_url":"https://api.github.com/repos/m-kuhn/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-kuhn/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-kuhn/QGIS/teams","hooks_url":"https://api.github.com/repos/m-kuhn/QGIS/hooks","issue_events_url":"https://api.github.com/repos/m-kuhn/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/m-kuhn/QGIS/events","assignees_url":"https://api.github.com/repos/m-kuhn/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/m-kuhn/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/m-kuhn/QGIS/tags","blobs_url":"https://api.github.com/repos/m-kuhn/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-kuhn/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-kuhn/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-kuhn/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-kuhn/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/m-kuhn/QGIS/languages","stargazers_url":"https://api.github.com/repos/m-kuhn/QGIS/stargazers","contributors_url":"https://api.github.com/repos/m-kuhn/QGIS/contributors","subscribers_url":"https://api.github.com/repos/m-kuhn/QGIS/subscribers","subscription_url":"https://api.github.com/repos/m-kuhn/QGIS/subscription","commits_url":"https://api.github.com/repos/m-kuhn/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-kuhn/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-kuhn/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-kuhn/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-kuhn/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/m-kuhn/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-kuhn/QGIS/merges","archive_url":"https://api.github.com/repos/m-kuhn/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-kuhn/QGIS/downloads","issues_url":"https://api.github.com/repos/m-kuhn/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/m-kuhn/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/m-kuhn/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/m-kuhn/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-kuhn/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/m-kuhn/QGIS/releases{/id}","created_at":"2012-08-02T09:19:28Z","updated_at":"2015-11-06T03:33:07Z","pushed_at":"2016-01-08T14:38:35Z","git_url":"git://github.com/m-kuhn/QGIS.git","ssh_url":"git@github.com:m-kuhn/QGIS.git","clone_url":"https://github.com/m-kuhn/QGIS.git","svn_url":"https://github.com/m-kuhn/QGIS","homepage":"http://qgis.org","size":1145118,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":3,"default_branch":"master"}},"base":{"label":"qgis:master","ref":"master","sha":"95a56b9c65d1438db7c86f4e6e1c848564795d2e","user":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"repo":{"id":1690480,"name":"QGIS","full_name":"qgis/QGIS","owner":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qgis/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":false,"url":"https://api.github.com/repos/qgis/QGIS","forks_url":"https://api.github.com/repos/qgis/QGIS/forks","keys_url":"https://api.github.com/repos/qgis/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qgis/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qgis/QGIS/teams","hooks_url":"https://api.github.com/repos/qgis/QGIS/hooks","issue_events_url":"https://api.github.com/repos/qgis/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/qgis/QGIS/events","assignees_url":"https://api.github.com/repos/qgis/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/qgis/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/qgis/QGIS/tags","blobs_url":"https://api.github.com/repos/qgis/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qgis/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qgis/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/qgis/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/qgis/QGIS/languages","stargazers_url":"https://api.github.com/repos/qgis/QGIS/stargazers","contributors_url":"https://api.github.com/repos/qgis/QGIS/contributors","subscribers_url":"https://api.github.com/repos/qgis/QGIS/subscribers","subscription_url":"https://api.github.com/repos/qgis/QGIS/subscription","commits_url":"https://api.github.com/repos/qgis/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/qgis/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/qgis/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/qgis/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/qgis/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/qgis/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qgis/QGIS/merges","archive_url":"https://api.github.com/repos/qgis/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qgis/QGIS/downloads","issues_url":"https://api.github.com/repos/qgis/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/qgis/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/qgis/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/qgis/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qgis/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/qgis/QGIS/releases{/id}","created_at":"2011-05-02T08:06:26Z","updated_at":"2016-01-09T06:55:32Z","pushed_at":"2016-01-09T20:58:17Z","git_url":"git://github.com/qgis/QGIS.git","ssh_url":"git@github.com:qgis/QGIS.git","clone_url":"https://github.com/qgis/QGIS.git","svn_url":"https://github.com/qgis/QGIS","homepage":"http://qgis.org","size":1220219,"stargazers_count":839,"watchers_count":839,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":769,"mirror_url":null,"open_issues_count":63,"forks":769,"open_issues":63,"watchers":839,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2651"},"html":{"href":"https://github.com/qgis/QGIS/pull/2651"},"issue":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2651"},"comments":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2651/comments"},"review_comments":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2651/comments"},"review_comment":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2651/commits"},"statuses":{"href":"https://api.github.com/repos/qgis/QGIS/statuses/31584dbbfe2dddb9c0ae9ded2f002746a3533985"}}}}