MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / insertMacroStep

Method insertMacroStep

src/dialogs/MacroEditorDialog.cpp:161–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void 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
179void MacroEditorDialog::deleteMacroStep()
180{

Callers

nothing calls this directly

Calls 1

insertRowsMethod · 0.45

Tested by

no test coverage detected