{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest/pulls/comments/241991917","pull_request_review_id":185399414,"id":241991917,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTk5MTkxNw==","diff_hunk":"@@ -3307,54 +3312,74 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)\n \t\tcase BET_DOWN:\n \t\t\t// Some mouse button has been pressed\n \n-\t\t\t//infostream<<\"Mouse button \"<<button<<\" pressed at p=(\"\n+\t\t\t//infostream<<\"Mouse button \"<<m_button<<\" pressed at p=(\"\n \t\t\t//\t<<p.X<<\",\"<<p.Y<<\")\"<<std::endl;\n \n \t\t\tm_selected_dragging = false;\n \n \t\t\tif (s.isValid() && s.listname == \"craftpreview\") {\n \t\t\t\t// Craft preview has been clicked: craft\n-\t\t\t\tcraft_amount = (button == BET_MIDDLE ? 10 : 1);\n+\t\t\t\tcraft_amount = (m_button == BET_MIDDLE ? 10 : 1);\n \t\t\t} else if (!m_selected_item) {\n-\t\t\t\tif (s_count && button != BET_WHEEL_UP) {\n+\t\t\t\tif (s_count && m_button != BET_WHEEL_UP) {\n \t\t\t\t\t// Non-empty stack has been clicked: select or shift-move it\n \t\t\t\t\tm_selected_item = new ItemSpec(s);\n \n \t\t\t\t\tu32 count;\n-\t\t\t\t\tif (button == BET_RIGHT)\n+\t\t\t\t\tif (m_button == BET_RIGHT)\n \t\t\t\t\t\tcount = (s_count + 1) / 2;\n-\t\t\t\t\telse if (button == BET_MIDDLE)\n+\t\t\t\t\telse if (m_button == BET_MIDDLE)\n \t\t\t\t\t\tcount = MYMIN(s_count, 10);\n-\t\t\t\t\telse if (button == BET_WHEEL_DOWN)\n+\t\t\t\t\telse if (m_button == BET_WHEEL_DOWN)\n \t\t\t\t\t\tcount = 1;\n \t\t\t\t\telse  // left\n \t\t\t\t\t\tcount = s_count;\n \n \t\t\t\t\tif (!event.MouseInput.Shift) {\n \t\t\t\t\t\t// no shift: select item\n+\n+\t\t\t\t\t\t// m_selected_item can be deleted by the black magic when it's empty\n+\t\t\t\t\t\t// As such we create our own copy of it for left drag handling\n+\t\t\t\t\t\tm_left_drag_item = new ItemSpec(s);","path":"src/gui/guiFormSpecMenu.cpp","position":101,"original_position":101,"commit_id":"60efba5eb5da8f729a439316f0477506bacece03","original_commit_id":"60efba5eb5da8f729a439316f0477506bacece03","user":{"login":"Quent42340","id":554446,"node_id":"MDQ6VXNlcjU1NDQ0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/554446?v=4","gravatar_id":"","url":"https://api.github.com/users/Quent42340","html_url":"https://github.com/Quent42340","followers_url":"https://api.github.com/users/Quent42340/followers","following_url":"https://api.github.com/users/Quent42340/following{/other_user}","gists_url":"https://api.github.com/users/Quent42340/gists{/gist_id}","starred_url":"https://api.github.com/users/Quent42340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quent42340/subscriptions","organizations_url":"https://api.github.com/users/Quent42340/orgs","repos_url":"https://api.github.com/users/Quent42340/repos","events_url":"https://api.github.com/users/Quent42340/events{/privacy}","received_events_url":"https://api.github.com/users/Quent42340/received_events","type":"User","site_admin":false},"body":"You're right, thanks for noticing. Though it's unclear why the author used `m_left_drag_item` and not `m_selected_item` only.","created_at":"2018-12-16T19:00:16Z","updated_at":"2018-12-16T19:00:17Z","html_url":"https://github.com/minetest/minetest/pull/7986#discussion_r241991917","pull_request_url":"https://api.github.com/repos/minetest/minetest/pulls/7986","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments/241991917"},"html":{"href":"https://github.com/minetest/minetest/pull/7986#discussion_r241991917"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7986"}},"in_reply_to_id":241991669},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/7986","id":238944995,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTQ0OTk1","html_url":"https://github.com/minetest/minetest/pull/7986","diff_url":"https://github.com/minetest/minetest/pull/7986.diff","patch_url":"https://github.com/minetest/minetest/pull/7986.patch","issue_url":"https://api.github.com/repos/minetest/minetest/issues/7986","number":7986,"state":"open","locked":false,"title":"Inventory lists: Middle drag + Left drag (#6544 revived)","user":{"login":"Quent42340","id":554446,"node_id":"MDQ6VXNlcjU1NDQ0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/554446?v=4","gravatar_id":"","url":"https://api.github.com/users/Quent42340","html_url":"https://github.com/Quent42340","followers_url":"https://api.github.com/users/Quent42340/followers","following_url":"https://api.github.com/users/Quent42340/following{/other_user}","gists_url":"https://api.github.com/users/Quent42340/gists{/gist_id}","starred_url":"https://api.github.com/users/Quent42340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quent42340/subscriptions","organizations_url":"https://api.github.com/users/Quent42340/orgs","repos_url":"https://api.github.com/users/Quent42340/repos","events_url":"https://api.github.com/users/Quent42340/events{/privacy}","received_events_url":"https://api.github.com/users/Quent42340/received_events","type":"User","site_admin":false},"body":"Since #6544 was under `Adoption Needed` tag, I decided to rebase it and take it further.\r\n\r\nI tested the PR, it seems to work perfectly, tell me if I need to change things in the code but looks good to me so far.","created_at":"2018-12-16T03:47:18Z","updated_at":"2018-12-16T19:00:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6ce5b18943629e910e8895ec9ae5d10b06cd470","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":780836613,"node_id":"MDU6TGFiZWw3ODA4MzY2MTM=","url":"https://api.github.com/repos/minetest/minetest/labels/@%20Client%20/%20Controls%20/%20Input","name":"@ Client / Controls / Input","color":"0e8a16","default":false},{"id":471238548,"node_id":"MDU6TGFiZWw0NzEyMzg1NDg=","url":"https://api.github.com/repos/minetest/minetest/labels/Feature","name":"Feature","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest/pulls/7986/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest/pulls/7986/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/7986/comments","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/60efba5eb5da8f729a439316f0477506bacece03","head":{"label":"Quent42340:middle-drag","ref":"middle-drag","sha":"60efba5eb5da8f729a439316f0477506bacece03","user":{"login":"Quent42340","id":554446,"node_id":"MDQ6VXNlcjU1NDQ0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/554446?v=4","gravatar_id":"","url":"https://api.github.com/users/Quent42340","html_url":"https://github.com/Quent42340","followers_url":"https://api.github.com/users/Quent42340/followers","following_url":"https://api.github.com/users/Quent42340/following{/other_user}","gists_url":"https://api.github.com/users/Quent42340/gists{/gist_id}","starred_url":"https://api.github.com/users/Quent42340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quent42340/subscriptions","organizations_url":"https://api.github.com/users/Quent42340/orgs","repos_url":"https://api.github.com/users/Quent42340/repos","events_url":"https://api.github.com/users/Quent42340/events{/privacy}","received_events_url":"https://api.github.com/users/Quent42340/received_events","type":"User","site_admin":false},"repo":{"id":159079570,"node_id":"MDEwOlJlcG9zaXRvcnkxNTkwNzk1NzA=","name":"minetest","full_name":"Quent42340/minetest","private":false,"owner":{"login":"Quent42340","id":554446,"node_id":"MDQ6VXNlcjU1NDQ0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/554446?v=4","gravatar_id":"","url":"https://api.github.com/users/Quent42340","html_url":"https://github.com/Quent42340","followers_url":"https://api.github.com/users/Quent42340/followers","following_url":"https://api.github.com/users/Quent42340/following{/other_user}","gists_url":"https://api.github.com/users/Quent42340/gists{/gist_id}","starred_url":"https://api.github.com/users/Quent42340/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quent42340/subscriptions","organizations_url":"https://api.github.com/users/Quent42340/orgs","repos_url":"https://api.github.com/users/Quent42340/repos","events_url":"https://api.github.com/users/Quent42340/events{/privacy}","received_events_url":"https://api.github.com/users/Quent42340/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Quent42340/minetest","description":"Minetest, an open source infinite-world block sandbox game engine with support for survival and crafting. Also see https://github.com/minetest/minetest_game","fork":true,"url":"https://api.github.com/repos/Quent42340/minetest","forks_url":"https://api.github.com/repos/Quent42340/minetest/forks","keys_url":"https://api.github.com/repos/Quent42340/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quent42340/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quent42340/minetest/teams","hooks_url":"https://api.github.com/repos/Quent42340/minetest/hooks","issue_events_url":"https://api.github.com/repos/Quent42340/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/Quent42340/minetest/events","assignees_url":"https://api.github.com/repos/Quent42340/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/Quent42340/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/Quent42340/minetest/tags","blobs_url":"https://api.github.com/repos/Quent42340/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quent42340/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quent42340/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quent42340/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quent42340/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/Quent42340/minetest/languages","stargazers_url":"https://api.github.com/repos/Quent42340/minetest/stargazers","contributors_url":"https://api.github.com/repos/Quent42340/minetest/contributors","subscribers_url":"https://api.github.com/repos/Quent42340/minetest/subscribers","subscription_url":"https://api.github.com/repos/Quent42340/minetest/subscription","commits_url":"https://api.github.com/repos/Quent42340/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quent42340/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quent42340/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quent42340/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quent42340/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/Quent42340/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quent42340/minetest/merges","archive_url":"https://api.github.com/repos/Quent42340/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quent42340/minetest/downloads","issues_url":"https://api.github.com/repos/Quent42340/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/Quent42340/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/Quent42340/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/Quent42340/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quent42340/minetest/labels{/name}","releases_url":"https://api.github.com/repos/Quent42340/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/Quent42340/minetest/deployments","created_at":"2018-11-25T22:13:29Z","updated_at":"2018-12-16T03:20:24Z","pushed_at":"2018-12-16T12:00:27Z","git_url":"git://github.com/Quent42340/minetest.git","ssh_url":"git@github.com:Quent42340/minetest.git","clone_url":"https://github.com/Quent42340/minetest.git","svn_url":"https://github.com/Quent42340/minetest","homepage":"http://minetest.net/","size":62730,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"minetest:master","ref":"master","sha":"24cdbe9bf5fae88d76252add1b4ba0f8a7d48697","user":{"login":"minetest","id":2624745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ3NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/2624745?v=4","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"repo":{"id":2168780,"node_id":"MDEwOlJlcG9zaXRvcnkyMTY4Nzgw","name":"minetest","full_name":"minetest/minetest","private":false,"owner":{"login":"minetest","id":2624745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ3NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/2624745?v=4","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/minetest/minetest","description":"Minetest, an open source infinite-world block sandbox game engine with support for survival and crafting. Also see https://github.com/minetest/minetest_game","fork":false,"url":"https://api.github.com/repos/minetest/minetest","forks_url":"https://api.github.com/repos/minetest/minetest/forks","keys_url":"https://api.github.com/repos/minetest/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minetest/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minetest/minetest/teams","hooks_url":"https://api.github.com/repos/minetest/minetest/hooks","issue_events_url":"https://api.github.com/repos/minetest/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/minetest/minetest/events","assignees_url":"https://api.github.com/repos/minetest/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/minetest/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/minetest/minetest/tags","blobs_url":"https://api.github.com/repos/minetest/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minetest/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minetest/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/minetest/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/minetest/minetest/languages","stargazers_url":"https://api.github.com/repos/minetest/minetest/stargazers","contributors_url":"https://api.github.com/repos/minetest/minetest/contributors","subscribers_url":"https://api.github.com/repos/minetest/minetest/subscribers","subscription_url":"https://api.github.com/repos/minetest/minetest/subscription","commits_url":"https://api.github.com/repos/minetest/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/minetest/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/minetest/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/minetest/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/minetest/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/minetest/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minetest/minetest/merges","archive_url":"https://api.github.com/repos/minetest/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minetest/minetest/downloads","issues_url":"https://api.github.com/repos/minetest/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/minetest/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/minetest/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/minetest/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minetest/minetest/labels{/name}","releases_url":"https://api.github.com/repos/minetest/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/minetest/minetest/deployments","created_at":"2011-08-07T13:48:36Z","updated_at":"2018-12-16T16:14:07Z","pushed_at":"2018-12-16T12:00:29Z","git_url":"git://github.com/minetest/minetest.git","ssh_url":"git@github.com:minetest/minetest.git","clone_url":"https://github.com/minetest/minetest.git","svn_url":"https://github.com/minetest/minetest","homepage":"http://minetest.net/","size":61696,"stargazers_count":3611,"watchers_count":3611,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":962,"mirror_url":null,"archived":false,"open_issues_count":814,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":962,"open_issues":814,"watchers":3611,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7986"},"html":{"href":"https://github.com/minetest/minetest/pull/7986"},"issue":{"href":"https://api.github.com/repos/minetest/minetest/issues/7986"},"comments":{"href":"https://api.github.com/repos/minetest/minetest/issues/7986/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7986/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7986/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest/statuses/60efba5eb5da8f729a439316f0477506bacece03"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Quent42340"}}