{"action":"created","comment":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/comments/33534772","id":33534772,"diff_hunk":"@@ -494,8 +495,25 @@ int main( int argc, char * * argv )\n \t\t}\n \t\telse\n \t\t{\n-\t\t\tEngine::getSong()->createNewProject();\n-\n+\t\t\t// If enabled, open last project if there is one. Else, create\n+\t\t\t// a new one.\n+\t\t\tif( !ConfigManager::inst()->value( \"app\", \"disableopenlast\" ).toInt() )\n+\t\t\t{\n+\t\t\t\tif( !ConfigManager::inst()->recentlyOpenedProjects().isEmpty() )\n+\t\t\t\t{\n+\t\t\t\t\tEngine::getSong()->loadProject(\n+\t\t\t\t\t\t\t\t\tConfigManager::inst()->\n+\t\t\t\t\t\t\t\t\t\trecentlyOpenedProjects().first() );\n+\t\t\t\t}\n+\t\t\t\telse\n+\t\t\t\t{\n+\t\t\t\t\tEngine::getSong()->createNewProject();\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\telse\n+\t\t\t{\n+\t\t\t\tEngine::getSong()->createNewProject();\n+\t\t\t}\n \t\t\t// [Settel] workaround: showMaximized() doesn't work with","path":"src/core/main.cpp","position":33,"original_position":33,"commit_id":"f0fe4d7ca75abcaa4941217f16a62f305d4a94e1","original_commit_id":"f0fe4d7ca75abcaa4941217f16a62f305d4a94e1","user":{"login":"Wallacoloo","id":1210751,"avatar_url":"https://avatars.githubusercontent.com/u/1210751?v=3","gravatar_id":"","url":"https://api.github.com/users/Wallacoloo","html_url":"https://github.com/Wallacoloo","followers_url":"https://api.github.com/users/Wallacoloo/followers","following_url":"https://api.github.com/users/Wallacoloo/following{/other_user}","gists_url":"https://api.github.com/users/Wallacoloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Wallacoloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wallacoloo/subscriptions","organizations_url":"https://api.github.com/users/Wallacoloo/orgs","repos_url":"https://api.github.com/users/Wallacoloo/repos","events_url":"https://api.github.com/users/Wallacoloo/events{/privacy}","received_events_url":"https://api.github.com/users/Wallacoloo/received_events","type":"User","site_admin":false},"body":"*If you want*, the above could be changed to something like: \r\n```c++\r\n\t\t\t// If enabled, open last project if there is one. Else, create\r\n\t\t\t// a new one.\r\n\t\t\tif( !ConfigManager::inst()->value( \"app\", \"disableopenlast\" ).toInt() && \r\n\t\t\t\t!ConfigManager::inst()->recentlyOpenedProjects().isEmpty()) )\r\n\t\t\t{\r\n\t\t\t\tEngine::getSong()->loadProject(\r\n\t\t\t\t\t\t\t\tConfigManager::inst()->\r\n\t\t\t\t\t\t\t\t\trecentlyOpenedProjects().first() );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tEngine::getSong()->createNewProject();\r\n\t\t\t}\r\n```\r\nto avoid the repeat call to `Engine::getSong()->createNewProject()`.","created_at":"2015-06-30T02:09:15Z","updated_at":"2015-06-30T02:09:15Z","html_url":"https://github.com/LMMS/lmms/pull/2140#discussion_r33534772","pull_request_url":"https://api.github.com/repos/LMMS/lmms/pulls/2140","_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments/33534772"},"html":{"href":"https://github.com/LMMS/lmms/pull/2140#discussion_r33534772"},"pull_request":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/2140"}}},"pull_request":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/2140","id":38806998,"html_url":"https://github.com/LMMS/lmms/pull/2140","diff_url":"https://github.com/LMMS/lmms/pull/2140.diff","patch_url":"https://github.com/LMMS/lmms/pull/2140.patch","issue_url":"https://api.github.com/repos/LMMS/lmms/issues/2140","number":2140,"state":"open","locked":false,"title":"[WIP]Open last active project. Fixes #503","user":{"login":"zonkmachine","id":6368949,"avatar_url":"https://avatars.githubusercontent.com/u/6368949?v=3","gravatar_id":"","url":"https://api.github.com/users/zonkmachine","html_url":"https://github.com/zonkmachine","followers_url":"https://api.github.com/users/zonkmachine/followers","following_url":"https://api.github.com/users/zonkmachine/following{/other_user}","gists_url":"https://api.github.com/users/zonkmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/zonkmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonkmachine/subscriptions","organizations_url":"https://api.github.com/users/zonkmachine/orgs","repos_url":"https://api.github.com/users/zonkmachine/repos","events_url":"https://api.github.com/users/zonkmachine/events{/privacy}","received_events_url":"https://api.github.com/users/zonkmachine/received_events","type":"User","site_admin":false},"body":"Issue #503, #1694\r\n\r\nThis should take care of issue #503 and implement automatic open of the last project. It has an option in 'Settings' to switch it off but is on by default.","created_at":"2015-06-29T19:13:19Z","updated_at":"2015-06-30T02:09:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a38cdfe3d90de60669e99c97eaeddef4d88775d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LMMS/lmms/pulls/2140/commits","review_comments_url":"https://api.github.com/repos/LMMS/lmms/pulls/2140/comments","review_comment_url":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LMMS/lmms/issues/2140/comments","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/f0fe4d7ca75abcaa4941217f16a62f305d4a94e1","head":{"label":"zonkmachine:openLastProject","ref":"openLastProject","sha":"f0fe4d7ca75abcaa4941217f16a62f305d4a94e1","user":{"login":"zonkmachine","id":6368949,"avatar_url":"https://avatars.githubusercontent.com/u/6368949?v=3","gravatar_id":"","url":"https://api.github.com/users/zonkmachine","html_url":"https://github.com/zonkmachine","followers_url":"https://api.github.com/users/zonkmachine/followers","following_url":"https://api.github.com/users/zonkmachine/following{/other_user}","gists_url":"https://api.github.com/users/zonkmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/zonkmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonkmachine/subscriptions","organizations_url":"https://api.github.com/users/zonkmachine/orgs","repos_url":"https://api.github.com/users/zonkmachine/repos","events_url":"https://api.github.com/users/zonkmachine/events{/privacy}","received_events_url":"https://api.github.com/users/zonkmachine/received_events","type":"User","site_admin":false},"repo":{"id":16267835,"name":"lmms","full_name":"zonkmachine/lmms","owner":{"login":"zonkmachine","id":6368949,"avatar_url":"https://avatars.githubusercontent.com/u/6368949?v=3","gravatar_id":"","url":"https://api.github.com/users/zonkmachine","html_url":"https://github.com/zonkmachine","followers_url":"https://api.github.com/users/zonkmachine/followers","following_url":"https://api.github.com/users/zonkmachine/following{/other_user}","gists_url":"https://api.github.com/users/zonkmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/zonkmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonkmachine/subscriptions","organizations_url":"https://api.github.com/users/zonkmachine/orgs","repos_url":"https://api.github.com/users/zonkmachine/repos","events_url":"https://api.github.com/users/zonkmachine/events{/privacy}","received_events_url":"https://api.github.com/users/zonkmachine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zonkmachine/lmms","description":"cross-platform music production software","fork":true,"url":"https://api.github.com/repos/zonkmachine/lmms","forks_url":"https://api.github.com/repos/zonkmachine/lmms/forks","keys_url":"https://api.github.com/repos/zonkmachine/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zonkmachine/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zonkmachine/lmms/teams","hooks_url":"https://api.github.com/repos/zonkmachine/lmms/hooks","issue_events_url":"https://api.github.com/repos/zonkmachine/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/zonkmachine/lmms/events","assignees_url":"https://api.github.com/repos/zonkmachine/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/zonkmachine/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/zonkmachine/lmms/tags","blobs_url":"https://api.github.com/repos/zonkmachine/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zonkmachine/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zonkmachine/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/zonkmachine/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zonkmachine/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/zonkmachine/lmms/languages","stargazers_url":"https://api.github.com/repos/zonkmachine/lmms/stargazers","contributors_url":"https://api.github.com/repos/zonkmachine/lmms/contributors","subscribers_url":"https://api.github.com/repos/zonkmachine/lmms/subscribers","subscription_url":"https://api.github.com/repos/zonkmachine/lmms/subscription","commits_url":"https://api.github.com/repos/zonkmachine/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/zonkmachine/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/zonkmachine/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/zonkmachine/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/zonkmachine/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/zonkmachine/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zonkmachine/lmms/merges","archive_url":"https://api.github.com/repos/zonkmachine/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zonkmachine/lmms/downloads","issues_url":"https://api.github.com/repos/zonkmachine/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/zonkmachine/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/zonkmachine/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/zonkmachine/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zonkmachine/lmms/labels{/name}","releases_url":"https://api.github.com/repos/zonkmachine/lmms/releases{/id}","created_at":"2014-01-27T03:01:16Z","updated_at":"2015-06-12T02:33:11Z","pushed_at":"2015-06-29T19:01:09Z","git_url":"git://github.com/zonkmachine/lmms.git","ssh_url":"git@github.com:zonkmachine/lmms.git","clone_url":"https://github.com/zonkmachine/lmms.git","svn_url":"https://github.com/zonkmachine/lmms","homepage":"http://lmms.sourceforge.net/","size":55922,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"LMMS:master","ref":"master","sha":"c3e3271ea20bf55e1368adc0dd2af928052a8803","user":{"login":"LMMS","id":6363159,"avatar_url":"https://avatars.githubusercontent.com/u/6363159?v=3","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"repo":{"id":15778896,"name":"lmms","full_name":"LMMS/lmms","owner":{"login":"LMMS","id":6363159,"avatar_url":"https://avatars.githubusercontent.com/u/6363159?v=3","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LMMS/lmms","description":"cross-platform music production software","fork":false,"url":"https://api.github.com/repos/LMMS/lmms","forks_url":"https://api.github.com/repos/LMMS/lmms/forks","keys_url":"https://api.github.com/repos/LMMS/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LMMS/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LMMS/lmms/teams","hooks_url":"https://api.github.com/repos/LMMS/lmms/hooks","issue_events_url":"https://api.github.com/repos/LMMS/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/LMMS/lmms/events","assignees_url":"https://api.github.com/repos/LMMS/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/LMMS/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/LMMS/lmms/tags","blobs_url":"https://api.github.com/repos/LMMS/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LMMS/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LMMS/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/LMMS/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/LMMS/lmms/languages","stargazers_url":"https://api.github.com/repos/LMMS/lmms/stargazers","contributors_url":"https://api.github.com/repos/LMMS/lmms/contributors","subscribers_url":"https://api.github.com/repos/LMMS/lmms/subscribers","subscription_url":"https://api.github.com/repos/LMMS/lmms/subscription","commits_url":"https://api.github.com/repos/LMMS/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/LMMS/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/LMMS/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/LMMS/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/LMMS/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/LMMS/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LMMS/lmms/merges","archive_url":"https://api.github.com/repos/LMMS/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LMMS/lmms/downloads","issues_url":"https://api.github.com/repos/LMMS/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/LMMS/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/LMMS/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/LMMS/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LMMS/lmms/labels{/name}","releases_url":"https://api.github.com/repos/LMMS/lmms/releases{/id}","created_at":"2014-01-09T20:43:43Z","updated_at":"2015-06-28T16:32:59Z","pushed_at":"2015-06-30T01:46:51Z","git_url":"git://github.com/LMMS/lmms.git","ssh_url":"git@github.com:LMMS/lmms.git","clone_url":"https://github.com/LMMS/lmms.git","svn_url":"https://github.com/LMMS/lmms","homepage":"http://lmms.io/","size":82207,"stargazers_count":418,"watchers_count":418,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":131,"mirror_url":null,"open_issues_count":425,"forks":131,"open_issues":425,"watchers":418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/2140"},"html":{"href":"https://github.com/LMMS/lmms/pull/2140"},"issue":{"href":"https://api.github.com/repos/LMMS/lmms/issues/2140"},"comments":{"href":"https://api.github.com/repos/LMMS/lmms/issues/2140/comments"},"review_comments":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/2140/comments"},"review_comment":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/2140/commits"},"statuses":{"href":"https://api.github.com/repos/LMMS/lmms/statuses/f0fe4d7ca75abcaa4941217f16a62f305d4a94e1"}}}}