From e15de53f15a7135d462f0b244029d7cbed87ae09 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Thu, 27 Aug 2009 16:21:39 +0000 Subject: GUI: Small change git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4082 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp') 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; } -- cgit v1.2.3