From b3d49c7335ce0726dcb6d55d25d107c482d1f113 Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Sun, 11 Sep 2016 12:51:50 -0400 Subject: [PATCH 1/2] Add missing IDs for the Watch window Fix the code window not floating when asked to do so via the popout menu. --- Source/Core/DolphinWX/Globals.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index 5779334918..9b95f5a3e0 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -188,6 +188,7 @@ enum IDM_LOG_WINDOW_PARENT, IDM_LOG_CONFIG_WINDOW_PARENT, IDM_REGISTER_WINDOW_PARENT, + IDM_WATCH_WINDOW_PARENT, IDM_BREAKPOINT_WINDOW_PARENT, IDM_MEMORY_WINDOW_PARENT, IDM_JIT_WINDOW_PARENT, @@ -199,6 +200,7 @@ enum IDM_FLOAT_LOG_WINDOW, IDM_FLOAT_LOG_CONFIG_WINDOW, IDM_FLOAT_REGISTER_WINDOW, + IDM_FLOAT_WATCH_WINDOW, IDM_FLOAT_BREAKPOINT_WINDOW, IDM_FLOAT_MEMORY_WINDOW, IDM_FLOAT_JIT_WINDOW, From 6029c946f5d846ea2723ace53a676363de10a7d5 Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Sun, 11 Sep 2016 18:52:48 -0400 Subject: [PATCH 2/2] Manually select the coresponding tab before floating a panel Doing this forces the window to be drawn before reparenting it. It fixes the possibility of creating an empty floating window if the selected tab wasn't corespoinding to the window. --- Source/Core/DolphinWX/FrameAui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/FrameAui.cpp b/Source/Core/DolphinWX/FrameAui.cpp index 238fce6c4b..e5ea077a28 100644 --- a/Source/Core/DolphinWX/FrameAui.cpp +++ b/Source/Core/DolphinWX/FrameAui.cpp @@ -297,9 +297,11 @@ void CFrame::DoFloatNotebookPage(wxWindowID Id) wxAuiNotebook* nb = GetNotebookFromId(i); if (nb->GetPageIndex(Win) != wxNOT_FOUND) { - nb->RemovePage(nb->GetPageIndex(Win)); + // Set the selected tab manually so the window is drawn before reparenting the window + nb->SetSelection(nb->GetPageIndex(Win)); // Create the parent frame and reparent the window CreateParentFrame(Win->GetId() + IDM_LOG_WINDOW_PARENT - IDM_LOG_WINDOW, Win->GetName(), Win); + nb->RemovePage(nb->GetPageIndex(Win)); if (nb->GetPageCount() == 0) AddRemoveBlankPage(); }