]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFoot.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / insets / InsetFoot.cpp
index 29890d136523a4845b3ad3e91ef9d8b41d4ea190..3331184887aa52ea0b6dc128b378ac0fff3bbf81 100644 (file)
@@ -84,9 +84,14 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype)
        InsetLayout const & il = getLayout();
        docstring const & count = il.counter();
        custom_label_ = translateIfPossible(il.labelstring());
-       if (cnts.hasCounter(count))
-               cnts.step(count, utype);
-       custom_label_ += ' ' + cnts.theCounter(count, lang->code());
+
+       Paragraph const & par = it.paragraph();
+       if (!par.isDeleted(it.pos())) {
+               if (cnts.hasCounter(count))
+                       cnts.step(count, utype);
+               custom_label_ += ' ' + cnts.theCounter(count, lang->code());
+       } else
+               custom_label_ += ' ' + from_ascii("#");
        setLabel(custom_label_);
 
        InsetCollapsible::updateBuffer(it, utype);