From 3c84f38ebea0f0cdeae52ec4ab5b9064d76dcf6c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 19 Sep 2015 08:44:09 +0200 Subject: [PATCH] =?UTF-8?q?GUI:=20chapters:=20correctly=20check=20for=20ed?= =?UTF-8?q?ition=20entry=20in=20=C2=BBexpand=20timecodes=C2=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise ChapterTimeStart and ChapterTimeEnd nodes may be created as direct children of an EditionEntry node resulting in invalid chapters. --- ChangeLog | 9 +++++++++ src/mkvtoolnix-gui/chapter_editor/tab.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f99668e6..2b0132d99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-09-19 Moritz Bunkus + + * 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 * MKVToolNix GUI: new merge tool feature: when dragging & dropping diff --git a/src/mkvtoolnix-gui/chapter_editor/tab.cpp b/src/mkvtoolnix-gui/chapter_editor/tab.cpp index cfce0fbd3..85a7644c1 100644 --- a/src/mkvtoolnix-gui/chapter_editor/tab.cpp +++ b/src/mkvtoolnix-gui/chapter_editor/tab.cpp @@ -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));