{"action":"created","comment":{"url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/comments/43666366","id":43666366,"diff_hunk":"@@ -510,6 +514,22 @@ void VCXYPadProperties::updatePresetsTree()\n     m_presetsTree->blockSignals(false);\n }\n \n+void VCXYPadProperties::selectItemOnPresetsTree(quint8 presetId)\n+{\n+    m_presetsTree->blockSignals(true);\n+\n+    for (int i = 0; i < m_presetsTree->topLevelItemCount(); ++i)\n+    {\n+        QTreeWidgetItem* treeItem = m_presetsTree->topLevelItem(i);\n+        if (treeItem->data(0, Qt::UserRole).toUInt() == presetId)\n+        {\n+            treeItem->setSelected(true);\n+            m_presetsTree->blockSignals(false);\n+            return;\n+        }\n+    }\n+}","path":"ui/src/virtualconsole/vcxypadproperties.cpp","position":29,"original_position":29,"commit_id":"c089ed7f8f8b984d20b2c7619ffd814dc01bdd2d","original_commit_id":"c089ed7f8f8b984d20b2c7619ffd814dc01bdd2d","user":{"login":"janosvitok","id":2714054,"avatar_url":"https://avatars.githubusercontent.com/u/2714054?v=3","gravatar_id":"","url":"https://api.github.com/users/janosvitok","html_url":"https://github.com/janosvitok","followers_url":"https://api.github.com/users/janosvitok/followers","following_url":"https://api.github.com/users/janosvitok/following{/other_user}","gists_url":"https://api.github.com/users/janosvitok/gists{/gist_id}","starred_url":"https://api.github.com/users/janosvitok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janosvitok/subscriptions","organizations_url":"https://api.github.com/users/janosvitok/orgs","repos_url":"https://api.github.com/users/janosvitok/repos","events_url":"https://api.github.com/users/janosvitok/events{/privacy}","received_events_url":"https://api.github.com/users/janosvitok/received_events","type":"User","site_admin":false},"body":"If the item is not found, the signals stay blocked forever. QSignalBlocker would be useful here, but it's a Qt5 class. It might be worth to backport it for our use until we drop Qt4 support.\r\n\r\nWithout QSignalBlocker, m_presetsTree->blockSignals(false) between lines 530 and 531 -OR- comment stating why it's not needed there.","created_at":"2015-11-02T19:02:11Z","updated_at":"2015-11-02T19:02:11Z","html_url":"https://github.com/mcallegari/qlcplus/pull/641#discussion_r43666366","pull_request_url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641","_links":{"self":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/comments/43666366"},"html":{"href":"https://github.com/mcallegari/qlcplus/pull/641#discussion_r43666366"},"pull_request":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641"}}},"pull_request":{"url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641","id":49444211,"html_url":"https://github.com/mcallegari/qlcplus/pull/641","diff_url":"https://github.com/mcallegari/qlcplus/pull/641.diff","patch_url":"https://github.com/mcallegari/qlcplus/pull/641.patch","issue_url":"https://api.github.com/repos/mcallegari/qlcplus/issues/641","number":641,"state":"open","locked":false,"title":"Add manual sort for presets on vcxypad","user":{"login":"grebecchi","id":11348993,"avatar_url":"https://avatars.githubusercontent.com/u/11348993?v=3","gravatar_id":"","url":"https://api.github.com/users/grebecchi","html_url":"https://github.com/grebecchi","followers_url":"https://api.github.com/users/grebecchi/followers","following_url":"https://api.github.com/users/grebecchi/following{/other_user}","gists_url":"https://api.github.com/users/grebecchi/gists{/gist_id}","starred_url":"https://api.github.com/users/grebecchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grebecchi/subscriptions","organizations_url":"https://api.github.com/users/grebecchi/orgs","repos_url":"https://api.github.com/users/grebecchi/repos","events_url":"https://api.github.com/users/grebecchi/events{/privacy}","received_events_url":"https://api.github.com/users/grebecchi/received_events","type":"User","site_admin":false},"body":"Hi everyone, this pull request add the possibility to manual sorting presets on vcxypad, that is very usefull for widgets with a high preset number.\r\nI have implemented the behaviour and look & feel with up/down buttons similar to other components.\r\n\r\n![preset sorting](https://cloud.githubusercontent.com/assets/11348993/10885565/2d9cf202-817e-11e5-9938-57547c2a15e3.png)\r\n","created_at":"2015-11-02T15:25:02Z","updated_at":"2015-11-02T19:02:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"083c9a8c05e28155ade73ce895d59cf2c2866aef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641/commits","review_comments_url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641/comments","review_comment_url":"https://api.github.com/repos/mcallegari/qlcplus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mcallegari/qlcplus/issues/641/comments","statuses_url":"https://api.github.com/repos/mcallegari/qlcplus/statuses/c089ed7f8f8b984d20b2c7619ffd814dc01bdd2d","head":{"label":"grebecchi:XYPad_updown","ref":"XYPad_updown","sha":"c089ed7f8f8b984d20b2c7619ffd814dc01bdd2d","user":{"login":"grebecchi","id":11348993,"avatar_url":"https://avatars.githubusercontent.com/u/11348993?v=3","gravatar_id":"","url":"https://api.github.com/users/grebecchi","html_url":"https://github.com/grebecchi","followers_url":"https://api.github.com/users/grebecchi/followers","following_url":"https://api.github.com/users/grebecchi/following{/other_user}","gists_url":"https://api.github.com/users/grebecchi/gists{/gist_id}","starred_url":"https://api.github.com/users/grebecchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grebecchi/subscriptions","organizations_url":"https://api.github.com/users/grebecchi/orgs","repos_url":"https://api.github.com/users/grebecchi/repos","events_url":"https://api.github.com/users/grebecchi/events{/privacy}","received_events_url":"https://api.github.com/users/grebecchi/received_events","type":"User","site_admin":false},"repo":{"id":39898459,"name":"qlcplus","full_name":"grebecchi/qlcplus","owner":{"login":"grebecchi","id":11348993,"avatar_url":"https://avatars.githubusercontent.com/u/11348993?v=3","gravatar_id":"","url":"https://api.github.com/users/grebecchi","html_url":"https://github.com/grebecchi","followers_url":"https://api.github.com/users/grebecchi/followers","following_url":"https://api.github.com/users/grebecchi/following{/other_user}","gists_url":"https://api.github.com/users/grebecchi/gists{/gist_id}","starred_url":"https://api.github.com/users/grebecchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grebecchi/subscriptions","organizations_url":"https://api.github.com/users/grebecchi/orgs","repos_url":"https://api.github.com/users/grebecchi/repos","events_url":"https://api.github.com/users/grebecchi/events{/privacy}","received_events_url":"https://api.github.com/users/grebecchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grebecchi/qlcplus","description":"Q Light Controller Plus","fork":true,"url":"https://api.github.com/repos/grebecchi/qlcplus","forks_url":"https://api.github.com/repos/grebecchi/qlcplus/forks","keys_url":"https://api.github.com/repos/grebecchi/qlcplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grebecchi/qlcplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grebecchi/qlcplus/teams","hooks_url":"https://api.github.com/repos/grebecchi/qlcplus/hooks","issue_events_url":"https://api.github.com/repos/grebecchi/qlcplus/issues/events{/number}","events_url":"https://api.github.com/repos/grebecchi/qlcplus/events","assignees_url":"https://api.github.com/repos/grebecchi/qlcplus/assignees{/user}","branches_url":"https://api.github.com/repos/grebecchi/qlcplus/branches{/branch}","tags_url":"https://api.github.com/repos/grebecchi/qlcplus/tags","blobs_url":"https://api.github.com/repos/grebecchi/qlcplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grebecchi/qlcplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grebecchi/qlcplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/grebecchi/qlcplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grebecchi/qlcplus/statuses/{sha}","languages_url":"https://api.github.com/repos/grebecchi/qlcplus/languages","stargazers_url":"https://api.github.com/repos/grebecchi/qlcplus/stargazers","contributors_url":"https://api.github.com/repos/grebecchi/qlcplus/contributors","subscribers_url":"https://api.github.com/repos/grebecchi/qlcplus/subscribers","subscription_url":"https://api.github.com/repos/grebecchi/qlcplus/subscription","commits_url":"https://api.github.com/repos/grebecchi/qlcplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/grebecchi/qlcplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/grebecchi/qlcplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/grebecchi/qlcplus/issues/comments{/number}","contents_url":"https://api.github.com/repos/grebecchi/qlcplus/contents/{+path}","compare_url":"https://api.github.com/repos/grebecchi/qlcplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grebecchi/qlcplus/merges","archive_url":"https://api.github.com/repos/grebecchi/qlcplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grebecchi/qlcplus/downloads","issues_url":"https://api.github.com/repos/grebecchi/qlcplus/issues{/number}","pulls_url":"https://api.github.com/repos/grebecchi/qlcplus/pulls{/number}","milestones_url":"https://api.github.com/repos/grebecchi/qlcplus/milestones{/number}","notifications_url":"https://api.github.com/repos/grebecchi/qlcplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grebecchi/qlcplus/labels{/name}","releases_url":"https://api.github.com/repos/grebecchi/qlcplus/releases{/id}","created_at":"2015-07-29T14:37:58Z","updated_at":"2015-07-29T14:38:06Z","pushed_at":"2015-11-02T15:16:06Z","git_url":"git://github.com/grebecchi/qlcplus.git","ssh_url":"git@github.com:grebecchi/qlcplus.git","clone_url":"https://github.com/grebecchi/qlcplus.git","svn_url":"https://github.com/grebecchi/qlcplus","homepage":null,"size":40855,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mcallegari:master","ref":"master","sha":"eb72884a0e0872906825f1948e20a6824002d7c1","user":{"login":"mcallegari","id":2951337,"avatar_url":"https://avatars.githubusercontent.com/u/2951337?v=3","gravatar_id":"","url":"https://api.github.com/users/mcallegari","html_url":"https://github.com/mcallegari","followers_url":"https://api.github.com/users/mcallegari/followers","following_url":"https://api.github.com/users/mcallegari/following{/other_user}","gists_url":"https://api.github.com/users/mcallegari/gists{/gist_id}","starred_url":"https://api.github.com/users/mcallegari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcallegari/subscriptions","organizations_url":"https://api.github.com/users/mcallegari/orgs","repos_url":"https://api.github.com/users/mcallegari/repos","events_url":"https://api.github.com/users/mcallegari/events{/privacy}","received_events_url":"https://api.github.com/users/mcallegari/received_events","type":"User","site_admin":false},"repo":{"id":6981258,"name":"qlcplus","full_name":"mcallegari/qlcplus","owner":{"login":"mcallegari","id":2951337,"avatar_url":"https://avatars.githubusercontent.com/u/2951337?v=3","gravatar_id":"","url":"https://api.github.com/users/mcallegari","html_url":"https://github.com/mcallegari","followers_url":"https://api.github.com/users/mcallegari/followers","following_url":"https://api.github.com/users/mcallegari/following{/other_user}","gists_url":"https://api.github.com/users/mcallegari/gists{/gist_id}","starred_url":"https://api.github.com/users/mcallegari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcallegari/subscriptions","organizations_url":"https://api.github.com/users/mcallegari/orgs","repos_url":"https://api.github.com/users/mcallegari/repos","events_url":"https://api.github.com/users/mcallegari/events{/privacy}","received_events_url":"https://api.github.com/users/mcallegari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcallegari/qlcplus","description":"Q Light Controller Plus","fork":false,"url":"https://api.github.com/repos/mcallegari/qlcplus","forks_url":"https://api.github.com/repos/mcallegari/qlcplus/forks","keys_url":"https://api.github.com/repos/mcallegari/qlcplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcallegari/qlcplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcallegari/qlcplus/teams","hooks_url":"https://api.github.com/repos/mcallegari/qlcplus/hooks","issue_events_url":"https://api.github.com/repos/mcallegari/qlcplus/issues/events{/number}","events_url":"https://api.github.com/repos/mcallegari/qlcplus/events","assignees_url":"https://api.github.com/repos/mcallegari/qlcplus/assignees{/user}","branches_url":"https://api.github.com/repos/mcallegari/qlcplus/branches{/branch}","tags_url":"https://api.github.com/repos/mcallegari/qlcplus/tags","blobs_url":"https://api.github.com/repos/mcallegari/qlcplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcallegari/qlcplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcallegari/qlcplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcallegari/qlcplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcallegari/qlcplus/statuses/{sha}","languages_url":"https://api.github.com/repos/mcallegari/qlcplus/languages","stargazers_url":"https://api.github.com/repos/mcallegari/qlcplus/stargazers","contributors_url":"https://api.github.com/repos/mcallegari/qlcplus/contributors","subscribers_url":"https://api.github.com/repos/mcallegari/qlcplus/subscribers","subscription_url":"https://api.github.com/repos/mcallegari/qlcplus/subscription","commits_url":"https://api.github.com/repos/mcallegari/qlcplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcallegari/qlcplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcallegari/qlcplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcallegari/qlcplus/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcallegari/qlcplus/contents/{+path}","compare_url":"https://api.github.com/repos/mcallegari/qlcplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcallegari/qlcplus/merges","archive_url":"https://api.github.com/repos/mcallegari/qlcplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcallegari/qlcplus/downloads","issues_url":"https://api.github.com/repos/mcallegari/qlcplus/issues{/number}","pulls_url":"https://api.github.com/repos/mcallegari/qlcplus/pulls{/number}","milestones_url":"https://api.github.com/repos/mcallegari/qlcplus/milestones{/number}","notifications_url":"https://api.github.com/repos/mcallegari/qlcplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcallegari/qlcplus/labels{/name}","releases_url":"https://api.github.com/repos/mcallegari/qlcplus/releases{/id}","created_at":"2012-12-03T11:36:20Z","updated_at":"2015-11-02T12:57:20Z","pushed_at":"2015-11-02T18:56:30Z","git_url":"git://github.com/mcallegari/qlcplus.git","ssh_url":"git@github.com:mcallegari/qlcplus.git","clone_url":"https://github.com/mcallegari/qlcplus.git","svn_url":"https://github.com/mcallegari/qlcplus","homepage":null,"size":57025,"stargazers_count":106,"watchers_count":106,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":24,"forks":88,"open_issues":24,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641"},"html":{"href":"https://github.com/mcallegari/qlcplus/pull/641"},"issue":{"href":"https://api.github.com/repos/mcallegari/qlcplus/issues/641"},"comments":{"href":"https://api.github.com/repos/mcallegari/qlcplus/issues/641/comments"},"review_comments":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641/comments"},"review_comment":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mcallegari/qlcplus/pulls/641/commits"},"statuses":{"href":"https://api.github.com/repos/mcallegari/qlcplus/statuses/c089ed7f8f8b984d20b2c7619ffd814dc01bdd2d"}}}}