Swap the items at idx and idx + 1
| 84 | |
| 85 | // Swap the items at idx and idx + 1 |
| 86 | void swap(wxCheckListBox *list, int idx, int sel_dir) { |
| 87 | if (idx < 0 || idx + 1 == (int)list->GetCount()) return; |
| 88 | |
| 89 | list->Freeze(); |
| 90 | wxString tempname = list->GetString(idx); |
| 91 | bool tempval = list->IsChecked(idx); |
| 92 | list->SetString(idx, list->GetString(idx + 1)); |
| 93 | list->Check(idx, list->IsChecked(idx + 1)); |
| 94 | list->SetString(idx + 1, tempname); |
| 95 | list->Check(idx + 1, tempval); |
| 96 | list->SetSelection(idx + sel_dir); |
| 97 | list->Thaw(); |
| 98 | } |
| 99 | |
| 100 | DialogExport::DialogExport(agi::Context *c) |
| 101 | : d(c->parent, -1, _("Export"), wxDefaultPosition, wxSize(200, 100), wxCAPTION | wxCLOSE_BOX) |
no test coverage detected