diff options
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp')
| -rw-r--r-- | Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp index be8b177b27..cb8e90d8e5 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp @@ -327,15 +327,13 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event) // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ wxWindow * CCodeWindow::GetNootebookPage(wxString Name) { - if (!Parent->m_NB[0] || !Parent->m_NB[1]) return NULL; - - for(u32 i = 0; i <= Parent->m_NB[0]->GetPageCount(); i++) - { - if (Parent->m_NB[0]->GetPageText(i).IsSameAs(Name)) return Parent->m_NB[0]->GetPage(i); - } - for(u32 i = 0; i <= Parent->m_NB[1]->GetPageCount(); i++) + for (int i = 0; i < Parent->m_NB.size(); i++) { - if (Parent->m_NB[1]->GetPageText(i).IsSameAs(Name)) return Parent->m_NB[1]->GetPage(i); + if (!Parent->m_NB[i]) return NULL; + for(u32 j = 0; j <= Parent->m_NB[j]->GetPageCount(); j++) + { + if (Parent->m_NB[i]->GetPageText(j).IsSameAs(Name)) return Parent->m_NB[i]->GetPage(j); + } } return NULL; } |
