{"action":"created","issue":{"url":"https://api.github.com/repos/nhold/wxWidgets/issues/127","labels_url":"https://api.github.com/repos/nhold/wxWidgets/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/nhold/wxWidgets/issues/127/comments","events_url":"https://api.github.com/repos/nhold/wxWidgets/issues/127/events","html_url":"https://github.com/nhold/wxWidgets/issues/127","id":104226810,"number":127,"title":"Selected tab disappears when manager's update is done on idle event","user":{"login":"Kinaou","id":4669963,"avatar_url":"https://avatars.githubusercontent.com/u/4669963?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinaou","html_url":"https://github.com/Kinaou","followers_url":"https://api.github.com/users/Kinaou/followers","following_url":"https://api.github.com/users/Kinaou/following{/other_user}","gists_url":"https://api.github.com/users/Kinaou/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinaou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinaou/subscriptions","organizations_url":"https://api.github.com/users/Kinaou/orgs","repos_url":"https://api.github.com/users/Kinaou/repos","events_url":"https://api.github.com/users/Kinaou/events{/privacy}","received_events_url":"https://api.github.com/users/Kinaou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-09-01T09:39:38Z","updated_at":"2016-01-06T14:18:16Z","closed_at":null,"body":"- Apply the following modifications on the auidemo.cpp file then run the demo\r\n- select 'View' > 'Add Panes' => 'Added pane 6' is selected and visible (tabs are right aligned)\r\n- select 'View' > 'Refresh on idle' => 'Added pane 6' is always selected but no more visible (tabs are left aligned)\r\n- move the mouse cursor on the left arrow of the tabs control => the tabs are right aligned anew\r\n\r\n@mjmacleod, do you have an idea why the refresh on idle event looses the alignment of the tabs?\r\n\r\n```diff\r\n@@ -65,0 +66,2 @@\r\n+        ID_AddPanes,\r\n+        ID_RefreshIdle,\r\n@@ -141,0 +144,3 @@\r\n+    void OnAddPanes(wxCommandEvent& WXUNUSED(event));\r\n+    void OnRefreshOnIdle(wxCommandEvent& WXUNUSED(event));\r\n+    void DoRefreshOnIdle(wxIdleEvent& WXUNUSED(event));\r\n@@ -581,0 +587,2 @@\r\n+    EVT_MENU(MyFrame::ID_AddPanes, MyFrame::OnAddPanes)\r\n+    EVT_MENU(MyFrame::ID_RefreshIdle, MyFrame::OnRefreshOnIdle)\r\n@@ -659,0 +667,2 @@\r\n+    view_menu->Append(ID_AddPanes, _(\"Add Panes\"));\r\n+    view_menu->Append(ID_RefreshIdle, _(\"Refresh on idle\"));\r\n@@ -1093,0 +1103,25 @@\r\n+}\r\n+\r\n+void MyFrame::OnAddPanes(wxCommandEvent& WXUNUSED(event))\r\n+{\r\n+    static int id = 1;\r\n+    wxHtmlWindow *ctrl = NULL;\r\n+    for (; id < 7; ++id) {\r\n+        ctrl = CreateHTMLCtrl();\r\n+        m_mgr.AddPane(ctrl, wxAuiPaneInfo().Center().\r\n+                    Name(wxString::Format(\"Pane%i\", id)).Caption(wxString::Format(\"Added pane %i\", id)).\r\n+                    CloseButton(true).MaximizeButton(true).Page(id+2).Floatable(true).Dockable(true).CenterDockable(true));\r\n+        m_mgr.Update();\r\n+    }\r\n+    if (ctrl)\r\n+        m_mgr.SetActivePane(ctrl);\r\n+    m_mgr.Update();\r\n+}\r\n+void MyFrame::OnRefreshOnIdle(wxCommandEvent& WXUNUSED(event))\r\n+{\r\n+    Bind(wxEVT_IDLE, &MyFrame::DoRefreshOnIdle, this);\r\n+}\r\n+void MyFrame::DoRefreshOnIdle(wxIdleEvent& WXUNUSED(event))\r\n+{\r\n+    m_mgr.Update();\r\n+    Unbind(wxEVT_IDLE, &MyFrame::DoRefreshOnIdle, this);\r\n```"},"comment":{"url":"https://api.github.com/repos/nhold/wxWidgets/issues/comments/169333480","html_url":"https://github.com/nhold/wxWidgets/issues/127#issuecomment-169333480","issue_url":"https://api.github.com/repos/nhold/wxWidgets/issues/127","id":169333480,"user":{"login":"mjmacleod","id":7540840,"avatar_url":"https://avatars.githubusercontent.com/u/7540840?v=3","gravatar_id":"","url":"https://api.github.com/users/mjmacleod","html_url":"https://github.com/mjmacleod","followers_url":"https://api.github.com/users/mjmacleod/followers","following_url":"https://api.github.com/users/mjmacleod/following{/other_user}","gists_url":"https://api.github.com/users/mjmacleod/gists{/gist_id}","starred_url":"https://api.github.com/users/mjmacleod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjmacleod/subscriptions","organizations_url":"https://api.github.com/users/mjmacleod/orgs","repos_url":"https://api.github.com/users/mjmacleod/repos","events_url":"https://api.github.com/users/mjmacleod/events{/privacy}","received_events_url":"https://api.github.com/users/mjmacleod/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T14:18:16Z","updated_at":"2016-01-06T14:18:16Z","body":"Only had time for a brief look, but it seems okay to me."}}