GUI: merge: fix default track column content when disabling tracks

See #1353.
This commit is contained in:
Moritz Bunkus 2015-09-05 15:39:03 +02:00
parent 165b377f45
commit feff8a2bdb
2 changed files with 10 additions and 2 deletions

View File

@ -540,6 +540,8 @@ Tab::onTrackItemChanged(QStandardItem *item) {
Util::setComboBoxIndexIf(ui->muxThis, [newMuxThis](QString const &, QVariant const &data) { return data.isValid() && (data.toBool() == newMuxThis); });
setOutputFileNameMaybe();
m_tracksModel->updateEffectiveDefaultTrackFlags();
}
void
@ -552,6 +554,8 @@ Tab::onMuxThisChanged(int selected) {
withSelectedTracks([&](Track *track) { track->m_muxThis = muxThis; });
setOutputFileNameMaybe();
m_tracksModel->updateEffectiveDefaultTrackFlags();
}
void
@ -566,14 +570,18 @@ Tab::toggleMuxThisForSelectedTracks() {
allEnabled = false;
}, false, ui->muxThis);
if (!tracksSelected)
if (!tracksSelected) {
m_tracksModel->updateEffectiveDefaultTrackFlags();
return;
}
auto newEnabled = !allEnabled;
withSelectedTracks([newEnabled](Track *track) { track->m_muxThis = newEnabled; }, false, ui->muxThis);
Util::setComboBoxIndexIf(ui->muxThis, [&](QString const &, QVariant const &data) { return data.isValid() && (data.toBool() == newEnabled); });
m_tracksModel->updateEffectiveDefaultTrackFlags();
}
void

View File

@ -653,7 +653,7 @@ TrackModel::updateEffectiveDefaultTrackFlags() {
track->m_effectiveDefaultTrackFlag = false;
}
for (auto &track : regularEnabledTracks)
for (auto &track : *m_tracks)
trackUpdated(track);
}