| 949 | } |
| 950 | |
| 951 | void 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 | |
| 969 | void MainWindow::copyFen() |
| 970 | { |