X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdvdwizardchapters.cpp;h=b289445f3aece719691def037aef5cf63246fe9d;hb=f4699aef75ea62acb69ad499317493facdef04df;hp=d95da170b8bae5f7061e9f8554752e52c72244bb;hpb=b94d740d404a3528c7d93a5ea2c734d9a092d78a;p=kdenlive diff --git a/src/dvdwizardchapters.cpp b/src/dvdwizardchapters.cpp index d95da170..b289445f 100644 --- a/src/dvdwizardchapters.cpp +++ b/src/dvdwizardchapters.cpp @@ -82,6 +82,7 @@ void DvdWizardChapters::slotUpdateChaptersList() } m_view.chapters_list->clear(); m_view.chapters_list->addItems(chaptersString); + updateMonitorMarkers(); //bool modified = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 2).toInt(); } @@ -110,6 +111,17 @@ void DvdWizardChapters::slotAddChapter() m_view.vob_list->setItemData(m_view.vob_list->currentIndex(), 1, Qt::UserRole + 2); m_view.chapters_list->clear(); m_view.chapters_list->addItems(chaptersString); + updateMonitorMarkers(); +} + +void DvdWizardChapters::updateMonitorMarkers() +{ + QStringList chapters = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList(); + QList markers; + foreach(const QString &frame, chapters) { + markers << CommentedTime(GenTime(frame.toInt(), m_tc.fps()), QString()); + } + m_monitor->setMarkers(markers); } void DvdWizardChapters::slotRemoveChapter() @@ -130,6 +142,7 @@ void DvdWizardChapters::slotRemoveChapter() } m_view.chapters_list->clear(); m_view.chapters_list->addItems(chaptersString); + updateMonitorMarkers(); } void DvdWizardChapters::slotGoToChapter()