| 159 | } |
| 160 | |
| 161 | void MacroEditorDialog::insertMacroStep() |
| 162 | { |
| 163 | QModelIndex currentIndex = ui->tblMacroSteps->selectionModel()->currentIndex(); |
| 164 | |
| 165 | if (currentIndex.isValid()) { |
| 166 | ui->tblMacroSteps->model()->insertRows(currentIndex.row() + 1, 1); |
| 167 | ui->tblMacroSteps->setCurrentIndex(ui->tblMacroSteps->model()->index(currentIndex.row() + 1, 0)); |
| 168 | } |
| 169 | else { |
| 170 | ui->tblMacroSteps->model()->insertRows(0, 1); |
| 171 | ui->tblMacroSteps->setCurrentIndex(ui->tblMacroSteps->model()->index(0, 0)); |
| 172 | } |
| 173 | |
| 174 | // Resize things if needed |
| 175 | ui->tblMacroSteps->resizeRowsToContents(); |
| 176 | ui->tblMacroSteps->resizeColumnToContents(0); |
| 177 | } |
| 178 | |
| 179 | void MacroEditorDialog::deleteMacroStep() |
| 180 | { |
nothing calls this directly
no test coverage detected