summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2009-08-27 16:21:39 +0000
committerJohn Peterson <jpeterson57@gmail.com>2009-08-27 16:21:39 +0000
commite15de53f15a7135d462f0b244029d7cbed87ae09 (patch)
tree47bd06d74bedb72f213d6224a6ad90c24306efc3 /Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp
parent97ea0362af2964fa1213d72d292203255cd02b3e (diff)
GUI: Small change
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4082 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp')
-rw-r--r--Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp14
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;
}