mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25070 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cebd63f844
commit
2003a50e14
@ -273,7 +273,12 @@ int TocModels::decodeType(QString const & str) const
|
|||||||
// Default to Outliner.
|
// Default to Outliner.
|
||||||
new_type = "tableofcontents";
|
new_type = "tableofcontents";
|
||||||
}
|
}
|
||||||
return types_.indexOf(new_type);
|
int const type = types_.indexOf(new_type);
|
||||||
|
if (type != -1)
|
||||||
|
return type;
|
||||||
|
// If everything else fails, settle on the table of contents which is
|
||||||
|
// guaranted to exist.
|
||||||
|
return types_.indexOf("tableofcontents");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
|
Loading…
Reference in New Issue
Block a user