]> git.lyx.org Git - lyx.git/commit
Fix dataloss when flex inset is undefined.
authorGuillaume Munch <gm@lyx.org>
Mon, 11 Apr 2016 16:33:14 +0000 (17:33 +0100)
committerGuillaume Munch <gm@lyx.org>
Mon, 11 Apr 2016 20:02:06 +0000 (21:02 +0100)
commitf180e813fef22dc79c0895b65d2551b0e2603a08
tree859ab8c2f1d099cf4b22baf881baba4b42455eb0
parent7c3fd636469b0a7f50f3515d100d9e957cda16b9
Fix dataloss when flex inset is undefined.

Regression at cfeddb929. If a flex inset has no layout upon saving (e.g. if a
module has been deleted) then its name became lost. This checks whether the name
resolution, introduced with the ObsoletedBy tag, comes back empty-handed (which
it will if the layout is not defined). In this case, we do as was done before
cfeddb929.

In addition, the use of support::token to strip "Flex:" off the beginning of the
name introduces a regression if somebody used a name containing ":". This
replaces it with support::split.
src/insets/InsetFlex.cpp