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

Method deleteInput

src/program/ui/InputEditorView.cpp:931–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

929}
930
931void InputEditorView::deleteInput()
932{
933 if (!selectionModel()->hasSelection())
934 return;
935
936 /* Removing rows must be done in reversed order so that row indices are valid */
937 int min_row = applyToSelectedRangesReversed([this](int min, int max){
938 inputEditorModel->removeMarkersInRange(min, max);
939 inputEditorModel->removeRows(min, max - min + 1);
940 });
941
942 /* Select the next frame */
943 QModelIndex newSel = inputEditorModel->index(min_row, 0);
944 selectionModel()->clear();
945 setCurrentIndex(newSel);
946 selectionModel()->select(newSel, QItemSelectionModel::Select | QItemSelectionModel::Rows);
947}
948
949void InputEditorView::truncateInputs()
950{

Callers

nothing calls this directly

Calls 6

hasSelectionMethod · 0.80
removeMarkersInRangeMethod · 0.80
indexMethod · 0.80
selectMethod · 0.80
removeRowsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected