| 1253 | |
| 1254 | /// |
| 1255 | void MacrosWindow::OnDelete(wxCommandEvent & WXUNUSED(event)) |
| 1256 | { |
| 1257 | long item = mList->GetNextItem(-1, |
| 1258 | wxLIST_NEXT_ALL, |
| 1259 | wxLIST_STATE_SELECTED); |
| 1260 | if (item == -1 || item + 1 == mList->GetItemCount()) { |
| 1261 | return; |
| 1262 | } |
| 1263 | |
| 1264 | mMacroCommands.DeleteFromMacro(item); |
| 1265 | |
| 1266 | mChanged = true; |
| 1267 | mSave->Enable( mChanged ); |
| 1268 | |
| 1269 | if (item >= (mList->GetItemCount() - 2) && item >= 0) { |
| 1270 | item--; |
| 1271 | } |
| 1272 | mSelectedCommand = item; |
| 1273 | PopulateList(); |
| 1274 | } |
| 1275 | |
| 1276 | /// |
| 1277 | void MacrosWindow::OnUp(wxCommandEvent & WXUNUSED(event)) |
nothing calls this directly
no test coverage detected