Commit adb00787 authored by Renaud Guezennec's avatar Renaud Guezennec

AudioPlayer: fix gm mode.

parent 0fcacdfd
......@@ -135,6 +135,8 @@ void AudioPlayer::setupUi()
connect(m_volumeControlled, &QCheckBox::toggled, m_globalVolume, &QSlider::setEnabled);
connect(m_volumeControlled, &QCheckBox::toggled, this, [this](bool checked) {
if(m_isGM)
return;
m_volumeControlable= checked;
std::for_each(m_players.begin(), m_players.end(),
[checked](PlayerWidget* player) { player->setControlledVolume(checked); });
......
......@@ -484,6 +484,9 @@ void PlayerWidget::updateUi(bool isGM)
m_ui->m_changeDirectory->setVisible(!isGM);
m_ui->m_timerDisplay->setVisible(isGM);
m_ui->m_volumeSlider->setValue(m_preferences->value(QString("volume_player_%1").arg(m_id), 50).toInt());
if(isGM)
setControlledVolume(false);
}
void PlayerWidget::updateIcon()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment