MCPcopy Create free account
hub / github.com/cutechess/cutechess / editMoveComment

Method editMoveComment

projects/gui/src/mainwindow.cpp:951–967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951void MainWindow::editMoveComment(int ply, const QString& comment)
952{
953 bool ok;
954 QString text = QInputDialog::getMultiLineText(this, tr("Edit move comment"),
955 tr("Comment:"), comment, &ok);
956 if (ok && text != comment)
957 {
958 lockCurrentGame();
959 PgnGame* pgn(m_tabs.at(m_tabBar->currentIndex()).m_pgn);
960 PgnGame::MoveData md(pgn->moves().at(ply));
961 md.comment = text;
962 pgn->setMove(ply, md);
963 unlockCurrentGame();
964
965 m_moveList->setMove(ply, md.move, md.moveString, text);
966 }
967}
968
969void MainWindow::copyFen()
970{

Callers

nothing calls this directly

Calls 3

atMethod · 0.80
movesMethod · 0.80
setMoveMethod · 0.45

Tested by

no test coverage detected