Pass isAlignmentOptimized flag to piece size calculation

This commit is contained in:
toster
2018-04-14 20:00:08 +03:00
parent e538eae726
commit c4625f50a8
3 changed files with 6 additions and 4 deletions

View File

@@ -215,8 +215,9 @@ void TorrentCreatorDlg::updateProgressBar(int progress)
void TorrentCreatorDlg::updatePiecesCount()
{
const QString path = m_ui->textInputPath->text().trimmed();
const bool isAlignmentOptimized = m_ui->checkOptimizeAlignment->isChecked();
const int count = BitTorrent::TorrentCreatorThread::calculateTotalPieces(path, getPieceSize());
const int count = BitTorrent::TorrentCreatorThread::calculateTotalPieces(path, getPieceSize(), isAlignmentOptimized);
m_ui->labelTotalPieces->setText(QString::number(count));
}