{"action":"created","comment":{"url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/comments/239066692","pull_request_review_id":181756924,"id":239066692,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTA2NjY5Mg==","diff_hunk":"@@ -302,28 +305,42 @@ bool wxToolbook::InsertPage(size_t n,\n     m_maxBitmapSize.x = wxMax(bitmap.GetWidth(), m_maxBitmapSize.x);\n     m_maxBitmapSize.y = wxMax(bitmap.GetHeight(), m_maxBitmapSize.y);\n \n+    int toolId = page->GetId();\n     GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);\n-    GetToolBar()->AddRadioTool(n + 1, text, bitmap, bitmap.ConvertToDisabled(), text);\n+    GetToolBar()->InsertTool(n, toolId, text, bitmap, bitmap.ConvertToDisabled(), wxITEM_RADIO);\n \n-    if (bSelect)\n+    // fix current selection\n+    if (m_selection < 0)\n     {\n-        GetToolBar()->ToggleTool(n, true);\n+        DoShowPage(page, true);\n         m_selection = n;\n     }\n-    else\n-        page->Hide();\n+    else if (m_selection >= (int) n)\n+    {\n+        DoShowPage(page, false);\n+        m_selection += 1;\n+    }\n+    else {","path":"src/generic/toolbkg.cpp","position":86,"original_position":86,"commit_id":"b848dd71eac575a492a74ae1c443edd89032f66a","original_commit_id":"b848dd71eac575a492a74ae1c443edd89032f66a","user":{"login":"vadz","id":146917,"node_id":"MDQ6VXNlcjE0NjkxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/146917?v=4","gravatar_id":"","url":"https://api.github.com/users/vadz","html_url":"https://github.com/vadz","followers_url":"https://api.github.com/users/vadz/followers","following_url":"https://api.github.com/users/vadz/following{/other_user}","gists_url":"https://api.github.com/users/vadz/gists{/gist_id}","starred_url":"https://api.github.com/users/vadz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadz/subscriptions","organizations_url":"https://api.github.com/users/vadz/orgs","repos_url":"https://api.github.com/users/vadz/repos","events_url":"https://api.github.com/users/vadz/events{/privacy}","received_events_url":"https://api.github.com/users/vadz/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n    else\r\n    {\r\n```","created_at":"2018-12-05T13:39:49Z","updated_at":"2018-12-05T13:45:17Z","html_url":"https://github.com/wxWidgets/wxWidgets/pull/1042#discussion_r239066692","pull_request_url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/comments/239066692"},"html":{"href":"https://github.com/wxWidgets/wxWidgets/pull/1042#discussion_r239066692"},"pull_request":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042"}}},"pull_request":{"url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042","id":236168861,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MTY4ODYx","html_url":"https://github.com/wxWidgets/wxWidgets/pull/1042","diff_url":"https://github.com/wxWidgets/wxWidgets/pull/1042.diff","patch_url":"https://github.com/wxWidgets/wxWidgets/pull/1042.patch","issue_url":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/1042","number":1042,"state":"open","locked":false,"title":"Crash fix in toolbook and insert now inserts and no longer appends","user":{"login":"sz5000","id":33447587,"node_id":"MDQ6VXNlcjMzNDQ3NTg3","avatar_url":"https://avatars0.githubusercontent.com/u/33447587?v=4","gravatar_id":"","url":"https://api.github.com/users/sz5000","html_url":"https://github.com/sz5000","followers_url":"https://api.github.com/users/sz5000/followers","following_url":"https://api.github.com/users/sz5000/following{/other_user}","gists_url":"https://api.github.com/users/sz5000/gists{/gist_id}","starred_url":"https://api.github.com/users/sz5000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sz5000/subscriptions","organizations_url":"https://api.github.com/users/sz5000/orgs","repos_url":"https://api.github.com/users/sz5000/repos","events_url":"https://api.github.com/users/sz5000/events{/privacy}","received_events_url":"https://api.github.com/users/sz5000/received_events","type":"User","site_admin":false},"body":"Current master has a bug in toolbook as describe here:\r\nhttps://trac.wxwidgets.org/ticket/18275\r\n\r\nThis patch fixes this bug.\r\n\r\nFurthermore, current master only appends tools and does not insert. This patch fixes this issue too.\r\n\r\nTested with the sample and works well now.","created_at":"2018-12-05T13:12:06Z","updated_at":"2018-12-05T13:45:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f61162b19a06b2c68d1a62fa3c819b9dbf3b7de","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042/commits","review_comments_url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042/comments","review_comment_url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/1042/comments","statuses_url":"https://api.github.com/repos/wxWidgets/wxWidgets/statuses/b848dd71eac575a492a74ae1c443edd89032f66a","head":{"label":"sz5000:master","ref":"master","sha":"b848dd71eac575a492a74ae1c443edd89032f66a","user":{"login":"sz5000","id":33447587,"node_id":"MDQ6VXNlcjMzNDQ3NTg3","avatar_url":"https://avatars0.githubusercontent.com/u/33447587?v=4","gravatar_id":"","url":"https://api.github.com/users/sz5000","html_url":"https://github.com/sz5000","followers_url":"https://api.github.com/users/sz5000/followers","following_url":"https://api.github.com/users/sz5000/following{/other_user}","gists_url":"https://api.github.com/users/sz5000/gists{/gist_id}","starred_url":"https://api.github.com/users/sz5000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sz5000/subscriptions","organizations_url":"https://api.github.com/users/sz5000/orgs","repos_url":"https://api.github.com/users/sz5000/repos","events_url":"https://api.github.com/users/sz5000/events{/privacy}","received_events_url":"https://api.github.com/users/sz5000/received_events","type":"User","site_admin":false},"repo":{"id":158803091,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg4MDMwOTE=","name":"wxWidgets","full_name":"sz5000/wxWidgets","private":false,"owner":{"login":"sz5000","id":33447587,"node_id":"MDQ6VXNlcjMzNDQ3NTg3","avatar_url":"https://avatars0.githubusercontent.com/u/33447587?v=4","gravatar_id":"","url":"https://api.github.com/users/sz5000","html_url":"https://github.com/sz5000","followers_url":"https://api.github.com/users/sz5000/followers","following_url":"https://api.github.com/users/sz5000/following{/other_user}","gists_url":"https://api.github.com/users/sz5000/gists{/gist_id}","starred_url":"https://api.github.com/users/sz5000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sz5000/subscriptions","organizations_url":"https://api.github.com/users/sz5000/orgs","repos_url":"https://api.github.com/users/sz5000/repos","events_url":"https://api.github.com/users/sz5000/events{/privacy}","received_events_url":"https://api.github.com/users/sz5000/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sz5000/wxWidgets","description":"Cross-Platform GUI Library - Report issues here: https://trac.wxwidgets.org/","fork":true,"url":"https://api.github.com/repos/sz5000/wxWidgets","forks_url":"https://api.github.com/repos/sz5000/wxWidgets/forks","keys_url":"https://api.github.com/repos/sz5000/wxWidgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sz5000/wxWidgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sz5000/wxWidgets/teams","hooks_url":"https://api.github.com/repos/sz5000/wxWidgets/hooks","issue_events_url":"https://api.github.com/repos/sz5000/wxWidgets/issues/events{/number}","events_url":"https://api.github.com/repos/sz5000/wxWidgets/events","assignees_url":"https://api.github.com/repos/sz5000/wxWidgets/assignees{/user}","branches_url":"https://api.github.com/repos/sz5000/wxWidgets/branches{/branch}","tags_url":"https://api.github.com/repos/sz5000/wxWidgets/tags","blobs_url":"https://api.github.com/repos/sz5000/wxWidgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sz5000/wxWidgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sz5000/wxWidgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/sz5000/wxWidgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sz5000/wxWidgets/statuses/{sha}","languages_url":"https://api.github.com/repos/sz5000/wxWidgets/languages","stargazers_url":"https://api.github.com/repos/sz5000/wxWidgets/stargazers","contributors_url":"https://api.github.com/repos/sz5000/wxWidgets/contributors","subscribers_url":"https://api.github.com/repos/sz5000/wxWidgets/subscribers","subscription_url":"https://api.github.com/repos/sz5000/wxWidgets/subscription","commits_url":"https://api.github.com/repos/sz5000/wxWidgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/sz5000/wxWidgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/sz5000/wxWidgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/sz5000/wxWidgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/sz5000/wxWidgets/contents/{+path}","compare_url":"https://api.github.com/repos/sz5000/wxWidgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sz5000/wxWidgets/merges","archive_url":"https://api.github.com/repos/sz5000/wxWidgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sz5000/wxWidgets/downloads","issues_url":"https://api.github.com/repos/sz5000/wxWidgets/issues{/number}","pulls_url":"https://api.github.com/repos/sz5000/wxWidgets/pulls{/number}","milestones_url":"https://api.github.com/repos/sz5000/wxWidgets/milestones{/number}","notifications_url":"https://api.github.com/repos/sz5000/wxWidgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sz5000/wxWidgets/labels{/name}","releases_url":"https://api.github.com/repos/sz5000/wxWidgets/releases{/id}","deployments_url":"https://api.github.com/repos/sz5000/wxWidgets/deployments","created_at":"2018-11-23T08:30:41Z","updated_at":"2018-12-05T13:04:32Z","pushed_at":"2018-12-05T13:04:29Z","git_url":"git://github.com/sz5000/wxWidgets.git","ssh_url":"git@github.com:sz5000/wxWidgets.git","clone_url":"https://github.com/sz5000/wxWidgets.git","svn_url":"https://github.com/sz5000/wxWidgets","homepage":"https://www.wxwidgets.org/","size":312337,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wxWidgets:master","ref":"master","sha":"f271cc61e8480c6ac319e5d3ea7e845a6bd0ed1c","user":{"login":"wxWidgets","id":791023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTAyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/791023?v=4","gravatar_id":"","url":"https://api.github.com/users/wxWidgets","html_url":"https://github.com/wxWidgets","followers_url":"https://api.github.com/users/wxWidgets/followers","following_url":"https://api.github.com/users/wxWidgets/following{/other_user}","gists_url":"https://api.github.com/users/wxWidgets/gists{/gist_id}","starred_url":"https://api.github.com/users/wxWidgets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxWidgets/subscriptions","organizations_url":"https://api.github.com/users/wxWidgets/orgs","repos_url":"https://api.github.com/users/wxWidgets/repos","events_url":"https://api.github.com/users/wxWidgets/events{/privacy}","received_events_url":"https://api.github.com/users/wxWidgets/received_events","type":"Organization","site_admin":false},"repo":{"id":1764646,"node_id":"MDEwOlJlcG9zaXRvcnkxNzY0NjQ2","name":"wxWidgets","full_name":"wxWidgets/wxWidgets","private":false,"owner":{"login":"wxWidgets","id":791023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTAyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/791023?v=4","gravatar_id":"","url":"https://api.github.com/users/wxWidgets","html_url":"https://github.com/wxWidgets","followers_url":"https://api.github.com/users/wxWidgets/followers","following_url":"https://api.github.com/users/wxWidgets/following{/other_user}","gists_url":"https://api.github.com/users/wxWidgets/gists{/gist_id}","starred_url":"https://api.github.com/users/wxWidgets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxWidgets/subscriptions","organizations_url":"https://api.github.com/users/wxWidgets/orgs","repos_url":"https://api.github.com/users/wxWidgets/repos","events_url":"https://api.github.com/users/wxWidgets/events{/privacy}","received_events_url":"https://api.github.com/users/wxWidgets/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wxWidgets/wxWidgets","description":"Cross-Platform GUI Library - Report issues here: https://trac.wxwidgets.org/","fork":false,"url":"https://api.github.com/repos/wxWidgets/wxWidgets","forks_url":"https://api.github.com/repos/wxWidgets/wxWidgets/forks","keys_url":"https://api.github.com/repos/wxWidgets/wxWidgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wxWidgets/wxWidgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wxWidgets/wxWidgets/teams","hooks_url":"https://api.github.com/repos/wxWidgets/wxWidgets/hooks","issue_events_url":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/events{/number}","events_url":"https://api.github.com/repos/wxWidgets/wxWidgets/events","assignees_url":"https://api.github.com/repos/wxWidgets/wxWidgets/assignees{/user}","branches_url":"https://api.github.com/repos/wxWidgets/wxWidgets/branches{/branch}","tags_url":"https://api.github.com/repos/wxWidgets/wxWidgets/tags","blobs_url":"https://api.github.com/repos/wxWidgets/wxWidgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wxWidgets/wxWidgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wxWidgets/wxWidgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/wxWidgets/wxWidgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wxWidgets/wxWidgets/statuses/{sha}","languages_url":"https://api.github.com/repos/wxWidgets/wxWidgets/languages","stargazers_url":"https://api.github.com/repos/wxWidgets/wxWidgets/stargazers","contributors_url":"https://api.github.com/repos/wxWidgets/wxWidgets/contributors","subscribers_url":"https://api.github.com/repos/wxWidgets/wxWidgets/subscribers","subscription_url":"https://api.github.com/repos/wxWidgets/wxWidgets/subscription","commits_url":"https://api.github.com/repos/wxWidgets/wxWidgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/wxWidgets/wxWidgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/wxWidgets/wxWidgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/wxWidgets/wxWidgets/contents/{+path}","compare_url":"https://api.github.com/repos/wxWidgets/wxWidgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wxWidgets/wxWidgets/merges","archive_url":"https://api.github.com/repos/wxWidgets/wxWidgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wxWidgets/wxWidgets/downloads","issues_url":"https://api.github.com/repos/wxWidgets/wxWidgets/issues{/number}","pulls_url":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls{/number}","milestones_url":"https://api.github.com/repos/wxWidgets/wxWidgets/milestones{/number}","notifications_url":"https://api.github.com/repos/wxWidgets/wxWidgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wxWidgets/wxWidgets/labels{/name}","releases_url":"https://api.github.com/repos/wxWidgets/wxWidgets/releases{/id}","deployments_url":"https://api.github.com/repos/wxWidgets/wxWidgets/deployments","created_at":"2011-05-18T05:54:03Z","updated_at":"2018-12-05T09:31:18Z","pushed_at":"2018-12-05T13:12:07Z","git_url":"git://github.com/wxWidgets/wxWidgets.git","ssh_url":"git@github.com:wxWidgets/wxWidgets.git","clone_url":"https://github.com/wxWidgets/wxWidgets.git","svn_url":"https://github.com/wxWidgets/wxWidgets","homepage":"https://www.wxwidgets.org/","size":312594,"stargazers_count":2205,"watchers_count":2205,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":834,"mirror_url":null,"archived":false,"open_issues_count":32,"license":null,"forks":834,"open_issues":32,"watchers":2205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042"},"html":{"href":"https://github.com/wxWidgets/wxWidgets/pull/1042"},"issue":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/1042"},"comments":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/issues/1042/comments"},"review_comments":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042/comments"},"review_comment":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/pulls/1042/commits"},"statuses":{"href":"https://api.github.com/repos/wxWidgets/wxWidgets/statuses/b848dd71eac575a492a74ae1c443edd89032f66a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vadz"}}