diff options
| author | facugaich <facugaich@gmail.com> | 2009-01-03 23:02:13 +0000 |
|---|---|---|
| committer | facugaich <facugaich@gmail.com> | 2009-01-03 23:02:13 +0000 |
| commit | 09b3d2d227581585d6008432bed9911a4e1997b2 (patch) | |
| tree | ea34e59c3b9e6f1cf7a01fae70e50bb569c9fe7b /Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp | |
| parent | 22753f9e3c8d72e1442518f720708633ddebadbb (diff) | |
Changed the way the iterator is used in PatchAddEdit, I thought I'd submit it since it makes for shorter code.
Also a couple of bugfixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1755 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp index dec2c32518..c3194c48d2 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp @@ -45,8 +45,8 @@ void CARCodeAddEdit::CreateGUIControls(int _selection) EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
- EntrySelection->SetRange((int)arCodes.size()-1, 0);
- EntrySelection->SetValue(_selection);
+ EntrySelection->SetRange(0, (int)arCodes.size()-1);
+ EntrySelection->SetValue((int)arCodes.size()-1 - _selection);
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
UpdateTextCtrl(currentCode);
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
@@ -76,7 +76,7 @@ void CARCodeAddEdit::OnClose(wxCloseEvent& WXUNUSED (event)) void CARCodeAddEdit::ChangeEntry(wxSpinEvent& event)
{
- ActionReplay::ARCode currentCode = arCodes.at(event.GetPosition());
+ ActionReplay::ARCode currentCode = arCodes.at((int)arCodes.size()-1 - event.GetPosition());
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
UpdateTextCtrl(currentCode);
}
|
