GUI: chapters: correctly check for edition entry in »expand timecodes«

Otherwise ChapterTimeStart and ChapterTimeEnd nodes may be created as
direct children of an EditionEntry node resulting in invalid chapters.
This commit is contained in:
Moritz Bunkus 2015-09-19 08:44:09 +02:00
parent 8ce03bb2a5
commit 3c84f38ebe
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2015-09-19 Moritz Bunkus <moritz@bunkus.org>
* MKVToolNix GUI: chapter editor bug fix: whenever the additional
modification of »expanding start/end timecodes to include the
minimum/maximum timecodes of their children« was run on an edition
entry then ChapterTimeStart and sometimes ChapterTimeEnd nodes
were inserted as direct children of the EditionEntry node when
saving. This resulted in invalid chapters.
2015-09-18 Moritz Bunkus <moritz@bunkus.org>
* MKVToolNix GUI: new merge tool feature: when dragging & dropping

View File

@ -1082,7 +1082,7 @@ Tab::expandTimecodes(QStandardItem *item) {
if (!item)
return {};
auto chapter = m_chapterModel->chapterFromItem(item);
auto chapter = item->parent() ? m_chapterModel->chapterFromItem(item) : ChapterPtr{};
if (!chapter) {
for (auto row = 0, numRows = item->rowCount(); row < numRows; ++row)
expandTimecodes(item->child(row));