Stick to the standard order of sections when inserting lines
This commit is contained in:
parent
205d408f3e
commit
96b3656742
3 changed files with 5 additions and 5 deletions
|
@ -26,19 +26,19 @@
|
|||
wxString const& AssEntry::GroupHeader(bool ssa) const {
|
||||
static wxString ass_headers[] = {
|
||||
"[Script Info]",
|
||||
"[Events]",
|
||||
"[V4+ Styles]",
|
||||
"[Fonts]",
|
||||
"[Graphics]",
|
||||
"[Events]",
|
||||
""
|
||||
};
|
||||
|
||||
static wxString ssa_headers[] = {
|
||||
"[Script Info]",
|
||||
"[Events]",
|
||||
"[V4 Styles]",
|
||||
"[Fonts]",
|
||||
"[Graphics]",
|
||||
"[Events]",
|
||||
""
|
||||
};
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
|
||||
enum AssEntryGroup {
|
||||
ENTRY_INFO = 0,
|
||||
ENTRY_DIALOGUE,
|
||||
ENTRY_STYLE,
|
||||
ENTRY_FONT,
|
||||
ENTRY_GRAPHIC,
|
||||
ENTRY_DIALOGUE,
|
||||
ENTRY_GROUP_MAX
|
||||
};
|
||||
|
||||
|
|
|
@ -274,13 +274,13 @@ void AssFile::InsertLine(AssEntry *entry) {
|
|||
entryIter it = Line.end();
|
||||
do {
|
||||
--it;
|
||||
if (it->Group() == entry->Group()) {
|
||||
if (it->Group() <= entry->Group()) {
|
||||
Line.insert(++it, *entry);
|
||||
return;
|
||||
}
|
||||
} while (it != Line.begin());
|
||||
|
||||
Line.push_back(*entry);
|
||||
Line.push_front(*entry);
|
||||
}
|
||||
|
||||
void AssFile::InsertAttachment(wxString filename) {
|
||||
|
|
Loading…
Reference in a new issue