{"action":"closed","issue":{"url":"https://api.github.com/repos/andy-goryachev/FxDock/issues/3","repository_url":"https://api.github.com/repos/andy-goryachev/FxDock","labels_url":"https://api.github.com/repos/andy-goryachev/FxDock/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/andy-goryachev/FxDock/issues/3/comments","events_url":"https://api.github.com/repos/andy-goryachev/FxDock/issues/3/events","html_url":"https://github.com/andy-goryachev/FxDock/issues/3","id":191785209,"number":3,"title":"Saved window settings are overwritten after closing window","user":{"login":"ChrisLMerrill","id":14020230,"avatar_url":"https://avatars.githubusercontent.com/u/14020230?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisLMerrill","html_url":"https://github.com/ChrisLMerrill","followers_url":"https://api.github.com/users/ChrisLMerrill/followers","following_url":"https://api.github.com/users/ChrisLMerrill/following{/other_user}","gists_url":"https://api.github.com/users/ChrisLMerrill/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisLMerrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisLMerrill/subscriptions","organizations_url":"https://api.github.com/users/ChrisLMerrill/orgs","repos_url":"https://api.github.com/users/ChrisLMerrill/repos","events_url":"https://api.github.com/users/ChrisLMerrill/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisLMerrill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"andy-goryachev","id":5430849,"avatar_url":"https://avatars.githubusercontent.com/u/5430849?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-goryachev","html_url":"https://github.com/andy-goryachev","followers_url":"https://api.github.com/users/andy-goryachev/followers","following_url":"https://api.github.com/users/andy-goryachev/following{/other_user}","gists_url":"https://api.github.com/users/andy-goryachev/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-goryachev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-goryachev/subscriptions","organizations_url":"https://api.github.com/users/andy-goryachev/orgs","repos_url":"https://api.github.com/users/andy-goryachev/repos","events_url":"https://api.github.com/users/andy-goryachev/events{/privacy}","received_events_url":"https://api.github.com/users/andy-goryachev/received_events","type":"User","site_admin":false},"assignees":[{"login":"andy-goryachev","id":5430849,"avatar_url":"https://avatars.githubusercontent.com/u/5430849?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-goryachev","html_url":"https://github.com/andy-goryachev","followers_url":"https://api.github.com/users/andy-goryachev/followers","following_url":"https://api.github.com/users/andy-goryachev/following{/other_user}","gists_url":"https://api.github.com/users/andy-goryachev/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-goryachev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-goryachev/subscriptions","organizations_url":"https://api.github.com/users/andy-goryachev/orgs","repos_url":"https://api.github.com/users/andy-goryachev/repos","events_url":"https://api.github.com/users/andy-goryachev/events{/privacy}","received_events_url":"https://api.github.com/users/andy-goryachev/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-11-26T03:56:19Z","updated_at":"2016-11-26T04:19:00Z","closed_at":"2016-11-26T04:19:00Z","body":"I'm trying to understand how to have my layout saved when the window is closed (using the X button on the window).\r\n\r\nIn MyWindow (extends FxDockWindow) constructor, I have:\r\n        setOnCloseRequest(event ->\r\n            {\r\n            saveLayout();\r\n            });\r\n\r\nWhen I start with a fresh layout (because FxDockFramework.loadLayout() returned 0), this works fine and my settings are saved.\r\n\r\nHowever, when restarting with a saved layout (FxDockFramework.loadLayout()), then my window close request handler is overwritten (by FrameworkBase.registerWindow()). So, I overrode confirmClosing() in MyWindow to call saveLayout(). This works - the settings are now also saved when the layout was restored...except that immediately after the window closes, FrameworkBase.unlinkWindow calls saveLayout() again...and the saved settings now has no windows in it.\r\n\r\nSo I need some advice on how to get the layout saved when the user closes the window this way.\r\n\r\nThanks in advance!\r\nChris\r\n\r\n(I've attached my example code)\r\n\r\n[MyApplication.txt](https://github.com/andy-goryachev/FxDock/files/614036/MyApplication.txt)\r\n[MyGenerator.txt](https://github.com/andy-goryachev/FxDock/files/614037/MyGenerator.txt)\r\n[MyPane.txt](https://github.com/andy-goryachev/FxDock/files/614038/MyPane.txt)\r\n[MyWindow.txt](https://github.com/andy-goryachev/FxDock/files/614039/MyWindow.txt)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"andy-goryachev"}}