MCPcopy Create free account
hub / github.com/clementgallet/libTAS / insertInputs

Method insertInputs

src/program/ui/InputEditorView.cpp:843–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841}
842
843void InputEditorView::insertInputs()
844{
845 const QModelIndexList indexes = selectionModel()->selectedRows();
846
847 /* If no row was selected, return */
848 if (indexes.count() == 0)
849 return;
850
851 bool ok;
852 int nbFrames = QInputDialog::getInt(this, tr("Insert frames"), tr("Number of frames to insert: "), 1, 0, 100000, 1, &ok);
853
854 if (ok) {
855 int insertRow = indexes[0].row();
856 inputEditorModel->insertRows(insertRow, nbFrames, false);
857 inputEditorModel->shiftMarkers(insertRow, nbFrames);
858 }
859}
860
861int InputEditorView::applyToSelectedRanges(std::function<void(int, int)> func)
862{

Callers

nothing calls this directly

Calls 2

insertRowsMethod · 0.80
shiftMarkersMethod · 0.80

Tested by

no test coverage detected