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

Method slotNew

src/program/ui/InputEventWindow.cpp:117–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void InputEventWindow::slotNew()
118{
119 const QModelIndexList indexes = inputEventView->selectionModel()->selectedRows();
120
121 if (indexes.count() == 0) {
122 inputEventModel->append();
123 return;
124 }
125
126 int min_row = 1 << 30;
127 int max_row = 0;
128 for (const QModelIndex index : indexes) {
129 if (index.row() < min_row)
130 min_row = index.row();
131 if (index.row() > max_row)
132 max_row = index.row();
133 }
134
135 inputEventModel->duplicate(min_row, max_row);
136}
137
138void InputEventWindow::slotRemove()
139{

Callers

nothing calls this directly

Calls 2

duplicateMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected