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

Method truncateInputs

src/program/ui/InputEditorView.cpp:949–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

947}
948
949void InputEditorView::truncateInputs()
950{
951 QMessageBox confirmBox;
952
953 confirmBox.setText("Really truncate the TAS?");
954 confirmBox.setInformativeText("Do you want to truncate all inputs beyond this point?");
955
956 confirmBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
957 confirmBox.setDefaultButton(QMessageBox::Yes);
958
959 if (confirmBox.exec() != QMessageBox::Yes) return;
960
961
962
963 const QModelIndexList indexes = selectionModel()->selectedRows();
964
965 /* If no row was selected, return */
966 if (indexes.count() == 0)
967 return;
968
969 int nbRows = inputEditorModel->frameCount();
970
971 inputEditorModel->removeRows(indexes[0].row()+1, nbRows-indexes[0].row()-1);
972}
973
974void InputEditorView::clearInputs()
975{

Callers

nothing calls this directly

Calls 2

frameCountMethod · 0.45
removeRowsMethod · 0.45

Tested by

no test coverage detected