Disable target track when disabling split audio from settings dialog

parent 8804b85a
...@@ -961,7 +961,7 @@ void MainWindow::setupActions() ...@@ -961,7 +961,7 @@ void MainWindow::setupActions()
toolbar->addAction(m_buttonAutomaticSplitAudio); toolbar->addAction(m_buttonAutomaticSplitAudio);
m_buttonAutomaticSplitAudio->setCheckable(true); m_buttonAutomaticSplitAudio->setCheckable(true);
m_buttonAutomaticSplitAudio->setChecked(KdenliveSettings::splitaudio()); m_buttonAutomaticSplitAudio->setChecked(KdenliveSettings::splitaudio());
connect(m_buttonAutomaticSplitAudio, SIGNAL(triggered()), this, SLOT(slotSwitchSplitAudio())); connect(m_buttonAutomaticSplitAudio, &QAction::toggled, this, &MainWindow::slotSwitchSplitAudio);
m_buttonVideoThumbs = new QAction(KoIconUtils::themedIcon(QStringLiteral("kdenlive-show-videothumb")), i18n("Show video thumbnails"), this); m_buttonVideoThumbs = new QAction(KoIconUtils::themedIcon(QStringLiteral("kdenlive-show-videothumb")), i18n("Show video thumbnails"), this);
toolbar->addAction(m_buttonVideoThumbs); toolbar->addAction(m_buttonVideoThumbs);
...@@ -1809,16 +1809,16 @@ void MainWindow::updateConfiguration() ...@@ -1809,16 +1809,16 @@ void MainWindow::updateConfiguration()
m_buttonAudioThumbs->setChecked(KdenliveSettings::audiothumbnails()); m_buttonAudioThumbs->setChecked(KdenliveSettings::audiothumbnails());
m_buttonVideoThumbs->setChecked(KdenliveSettings::videothumbnails()); m_buttonVideoThumbs->setChecked(KdenliveSettings::videothumbnails());
m_buttonShowMarkers->setChecked(KdenliveSettings::showmarkers()); m_buttonShowMarkers->setChecked(KdenliveSettings::showmarkers());
m_buttonAutomaticSplitAudio->setChecked(KdenliveSettings::splitaudio()); slotSwitchSplitAudio(KdenliveSettings::splitaudio());
// Update list of transcoding profiles // Update list of transcoding profiles
buildDynamicActions(); buildDynamicActions();
loadClipActions(); loadClipActions();
} }
void MainWindow::slotSwitchSplitAudio() void MainWindow::slotSwitchSplitAudio(bool enable)
{ {
KdenliveSettings::setSplitaudio(!KdenliveSettings::splitaudio()); KdenliveSettings::setSplitaudio(enable);
m_buttonAutomaticSplitAudio->setChecked(KdenliveSettings::splitaudio()); m_buttonAutomaticSplitAudio->setChecked(KdenliveSettings::splitaudio());
if (pCore->projectManager()->currentTimeline()) { if (pCore->projectManager()->currentTimeline()) {
pCore->projectManager()->currentTimeline()->updateHeaders(); pCore->projectManager()->currentTimeline()->updateHeaders();
......
...@@ -274,7 +274,7 @@ private slots: ...@@ -274,7 +274,7 @@ private slots:
void slotEditProjectSettings(); void slotEditProjectSettings();
/** @brief Turns automatic splitting of audio and video on/off. */ /** @brief Turns automatic splitting of audio and video on/off. */
void slotSwitchSplitAudio(); void slotSwitchSplitAudio(bool enable);
void slotSwitchMarkersComments(); void slotSwitchMarkersComments();
void slotSwitchSnap(); void slotSwitchSnap();
void slotRenderProject(); void slotRenderProject();
......
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