1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-11 06:32:59 +00:00

Update pieces label on source change even if piece size doesn't change (#6516)

Label update is made when slider changes its value, and on source change
slider value is being set to a newly calculated, but not necessarily
different from the previous one, value. This means that the slider
change signal may not be emitted, in which case label continues to show
previous text, including "No source selected", which is misleading.
This commit is contained in:
Mike Gelfand 2024-01-14 17:12:26 +00:00 committed by GitHub
parent 1de6e93fec
commit 7ec7607bbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,11 +223,9 @@ void MakeDialog::onSourceChanged()
builder_.emplace(filename.toStdString());
}
if (!builder_)
{
updatePiecesLabel();
}
else
updatePiecesLabel();
if (builder_)
{
ui_.pieceSizeSlider->setValue(log2(builder_->piece_size()));
}