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:
parent
1ccef92cdc
commit
352fa985b2
|
@ -220,11 +220,9 @@ void MakeDialog::onSourceChanged()
|
|||
builder_.emplace(filename.toStdString());
|
||||
}
|
||||
|
||||
if (!builder_)
|
||||
{
|
||||
updatePiecesLabel();
|
||||
}
|
||||
else
|
||||
updatePiecesLabel();
|
||||
|
||||
if (builder_)
|
||||
{
|
||||
ui_.pieceSizeSlider->setValue(log2(builder_->pieceSize()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue