{"action":"opened","issue":{"url":"https://api.github.com/repos/okamstudio/godot/issues/1245","labels_url":"https://api.github.com/repos/okamstudio/godot/issues/1245/labels{/name}","comments_url":"https://api.github.com/repos/okamstudio/godot/issues/1245/comments","events_url":"https://api.github.com/repos/okamstudio/godot/issues/1245/events","html_url":"https://github.com/okamstudio/godot/issues/1245","id":54657948,"number":1245,"title":"[Bug] Closing Godot with a Texture in the tree is loosing properties","user":{"login":"philiplb","id":1672238,"avatar_url":"https://avatars.githubusercontent.com/u/1672238?v=3","gravatar_id":"","url":"https://api.github.com/users/philiplb","html_url":"https://github.com/philiplb","followers_url":"https://api.github.com/users/philiplb/followers","following_url":"https://api.github.com/users/philiplb/following{/other_user}","gists_url":"https://api.github.com/users/philiplb/gists{/gist_id}","starred_url":"https://api.github.com/users/philiplb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philiplb/subscriptions","organizations_url":"https://api.github.com/users/philiplb/orgs","repos_url":"https://api.github.com/users/philiplb/repos","events_url":"https://api.github.com/users/philiplb/events{/privacy}","received_events_url":"https://api.github.com/users/philiplb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-17T10:32:59Z","updated_at":"2015-01-17T10:32:59Z","closed_at":null,"body":"See this project: http://www.philiplb.de/misc/BGTest.zip\r\nThe initial settings of the node \"background\" where:\r\nAnchors:\r\n- left: begin\r\n- right: end\r\n- top: begin\r\n- bottom: end\r\nMargins:\r\n0, 0, 0, 0\r\n\r\nI save the project and closed Godot. On reopening, all anchors are back to begin and the margins are set to 400, 300, 400, 300 leaving the size to 0 pixel.\r\n\r\nCurrent workaround is to set it in _ready:\r\n\r\n\tvar size = get_viewport_rect().size\r\n\tvar background = get_node(\"background\")\r\n\tbackground.set_custom_minimum_size(size)\r\n\tbackground.set_anchor(MARGIN_LEFT, ANCHOR_BEGIN)\r\n\tbackground.set_anchor(MARGIN_RIGHT, ANCHOR_END)\r\n\tbackground.set_anchor(MARGIN_TOP, ANCHOR_BEGIN)\r\n\tbackground.set_anchor(MARGIN_BOTTOM, ANCHOR_END)\r\n\tbackground.set_margin(MARGIN_LEFT, 0)\r\n\tbackground.set_margin(MARGIN_TOP, 0)\r\n\tbackground.set_margin(MARGIN_RIGHT, 0)\r\n\tbackground.set_margin(MARGIN_BOTTOM, 0)"}}