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

Method shiftMarkers

src/program/ui/InputEditorModel.cpp:1427–1444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1425}
1426
1427void InputEditorModel::shiftMarkers(int startRow, int offset) {
1428 if (!context->config.editor_move_marker)
1429 return;
1430
1431 // Create a temporary map to store updated markers
1432 std::map<int, std::string> updatedMarkers;
1433
1434 for (const auto& marker : movie->editor->markers) {
1435 if (marker.first >= startRow) {
1436 updatedMarkers[marker.first + offset] = marker.second;
1437 } else {
1438 updatedMarkers[marker.first] = marker.second;
1439 }
1440 }
1441
1442 // Replace the old markers with the updated ones
1443 movie->editor->markers = std::move(updatedMarkers);
1444}
1445
1446void InputEditorModel::removeMarkersInRange(int startRow, int endRow) {
1447 if (!context->config.editor_move_marker)

Callers 3

duplicateInputMethod · 0.80
insertInputMethod · 0.80
insertInputsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected