{"action":"created","issue":{"url":"https://api.github.com/repos/qgis/QGIS/issues/7522","repository_url":"https://api.github.com/repos/qgis/QGIS","labels_url":"https://api.github.com/repos/qgis/QGIS/issues/7522/labels{/name}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/7522/comments","events_url":"https://api.github.com/repos/qgis/QGIS/issues/7522/events","html_url":"https://github.com/qgis/QGIS/pull/7522","id":347228227,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1OTAzMTMx","number":7522,"title":"Improved warnings on closing projects with unsaved layers and memory layers","user":{"login":"nyalldawson","id":1829991,"node_id":"MDQ6VXNlcjE4Mjk5OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1829991?v=4","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},"labels":[{"id":310142088,"node_id":"MDU6TGFiZWwzMTAxNDIwODg=","url":"https://api.github.com/repos/qgis/QGIS/labels/Bugfix","name":"Bugfix","color":"e11d21","default":false},{"id":415943426,"node_id":"MDU6TGFiZWw0MTU5NDM0MjY=","url":"https://api.github.com/repos/qgis/QGIS/labels/Needs%20Backporting","name":"Needs Backporting","color":"5319e7","default":false},{"id":960672186,"node_id":"MDU6TGFiZWw5NjA2NzIxODY=","url":"https://api.github.com/repos/qgis/QGIS/labels/UX","name":"UX","color":"80edce","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/qgis/QGIS/milestones/13","html_url":"https://github.com/qgis/QGIS/milestone/13","labels_url":"https://api.github.com/repos/qgis/QGIS/milestones/13/labels","id":3380708,"node_id":"MDk6TWlsZXN0b25lMzM4MDcwOA==","number":13,"title":"3.4","description":"","creator":{"login":"m-kuhn","id":588407,"node_id":"MDQ6VXNlcjU4ODQwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/588407?v=4","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},"open_issues":9,"closed_issues":139,"state":"open","created_at":"2018-05-28T11:10:30Z","updated_at":"2018-08-07T00:59:59Z","due_on":"2018-10-26T07:00:00Z","closed_at":null},"comments":9,"created_at":"2018-08-03T01:34:08Z","updated_at":"2018-08-07T02:09:33Z","closed_at":"2018-08-03T06:50:13Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/7522","html_url":"https://github.com/qgis/QGIS/pull/7522","diff_url":"https://github.com/qgis/QGIS/pull/7522.diff","patch_url":"https://github.com/qgis/QGIS/pull/7522.patch"},"body":"This PR:\r\n\r\n1. Improves the current \"unsaved changes in a layer\" warnings on closing projects, to move this warning to occur BEFORE the \"unsaved project\" dialog. This now allows users to cancel the close when a layer has unsaved edits, where before they had no option but to either discard or save the changes. Sometimes you want to manually see and decide what action to take - which the new cancel option allows. It also fixes a bug where sometimes the \"unsaved layer changes\" warning wouldn't appear for some layers. Additionally, we now avoid showing the \"unsaved layer changes\" warning for memory layers -- it's misleading, because on project close clicking \"save\" to this warning has no effect -- the memory layer's contents are discarded anyway.\r\n\r\n2. Adds a new warning on project close if a layer contains ANY memory layers with features present. These layers are temporary only, and their contents will be lost on project close. Again, the default action is to cancel the project close, allowing users the chance to manually save these layers out to a permanent location if desired.\r\n\r\nShould help avoid data loss for users working with memory layers, especially memory layers created as a result of processing algorithms. And it'll pair very nicely with #7516!\r\n\r\nNote that I believe this should be classified as a bug fix and intend to backport to 3.2.\r\n\r\nScreencast:\r\n\r\n![peek 2018-08-03 11-28](https://user-images.githubusercontent.com/1829991/43619414-fecbd51e-9710-11e8-869e-9f71a04048bc.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/qgis/QGIS/issues/comments/410909664","html_url":"https://github.com/qgis/QGIS/pull/7522#issuecomment-410909664","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/7522","id":410909664,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDkwOTY2NA==","user":{"login":"nyalldawson","id":1829991,"node_id":"MDQ6VXNlcjE4Mjk5OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1829991?v=4","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},"created_at":"2018-08-07T02:09:33Z","updated_at":"2018-08-07T02:09:33Z","author_association":"CONTRIBUTOR","body":"> @nyalldawson Is-it normal that I don't have any warnings when I have some memory layers and I try to save the project (ctrl+s) without closing the project for instance.\r\n\r\nYes - that's expected. The warning is triggered on project close, not project save."}}
{"actor":{"display_login":"nyalldawson"}}