]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
When we use InPremable styles, we want to write as many versions
[lyx.git] / src / DocIterator.cpp
index 9783db14a10d9562df0444c144ced76037b4f87b..a059ad18d2110b52fe88153b65ef4d5669ed288e 100644 (file)
@@ -226,6 +226,15 @@ CursorSlice const & DocIterator::innerTextSlice() const
 }
 
 
+DocIterator DocIterator::getInnerText() const
+{
+       DocIterator texted = *this;
+       while (!texted.inTexted()) 
+               texted.pop_back();
+       return texted;
+}
+
+
 pit_type DocIterator::lastpit() const
 {
        return inMathed() ? 0 : text()->paragraphs().size() - 1;
@@ -590,8 +599,7 @@ void DocIterator::sanitize()
                        fixIfBroken();
                        break;
                }
-               if ((inset->inMathed() && !inset->isActive())
-                   || (!inset->inMathed() && !inset->editable())) {
+               if (!inset->isActive()) {
                        LYXERR0("Inset found on cursor stack is not active.");
                        fixIfBroken();
                        break;