mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix infinitely updating simultaneous turns slider
This commit is contained in:
@@ -340,10 +340,10 @@ void OptionsTabBase::recreate(bool campaign)
|
||||
|
||||
//Simultaneous turns
|
||||
if(auto turnSlider = widget<CSlider>("simturnsDurationMin"))
|
||||
turnSlider->setValue(SEL->getStartInfo()->simturnsInfo.requiredTurns);
|
||||
turnSlider->setValue(SEL->getStartInfo()->simturnsInfo.requiredTurns, false);
|
||||
|
||||
if(auto turnSlider = widget<CSlider>("simturnsDurationMax"))
|
||||
turnSlider->setValue(SEL->getStartInfo()->simturnsInfo.optionalTurns);
|
||||
turnSlider->setValue(SEL->getStartInfo()->simturnsInfo.optionalTurns, false);
|
||||
|
||||
if(auto w = widget<CLabel>("labelSimturnsDurationValueMin"))
|
||||
w->setText(generateSimturnsDurationText(SEL->getStartInfo()->simturnsInfo.requiredTurns));
|
||||
@@ -388,7 +388,7 @@ void OptionsTabBase::recreate(bool campaign)
|
||||
auto & tpreset = variables["timerPresets"].Vector()[idx];
|
||||
if(tpreset.Vector().at(1).Integer() == turnTimerRemote.turnTimer / 1000)
|
||||
{
|
||||
turnSlider->scrollTo(idx);
|
||||
turnSlider->scrollTo(idx, false);
|
||||
if(auto w = widget<CLabel>("labelTurnDurationValue"))
|
||||
w->setText(CGI->generaltexth->turnDurations[idx]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user