#include "debug.h"
#include "iterators.h"
#include "lyxlex.h"
+#include "WordLangTuple.h"
#include "frontends/Alert.h"
#include "frontends/Dialogs.h"
if (texrowpar == 0)
continue;
+ freezeUndo();
InsetError * new_inset = new InsetError(msgtxt);
text->setCursorIntern(this, texrowpar, tmppos);
text->insertInset(this, new_inset);
text->fullRebreak(this);
+ unFreezeUndo();
}
// Restore the cursor position
text->setCursorIntern(this, cursor.par(), cursor.pos());
}
}
// Then do a deep look of the inset and lock the right one
- Paragraph * par = buffer()->paragraph;
int const id = inset->id();
- while (par) {
- InsetList::iterator it =
- par->insetlist.begin();
- InsetList::iterator const end =
- par->insetlist.end();
+ ParagraphList::iterator pit = buffer()->paragraphs.begin();
+ ParagraphList::iterator pend = buffer()->paragraphs.end();
+ for (; pit != pend; ++pit) {
+ InsetList::iterator it = pit->insetlist.begin();
+ InsetList::iterator end = pit->insetlist.end();
for (; it != end; ++it) {
if (it.getInset() == inset) {
- text->setCursorIntern(this, par, it.getPos());
+ text->setCursorIntern(this, &*pit, it.getPos());
theLockingInset(inset);
return true;
}
if (it.getInset()->getInsetFromID(id)) {
- text->setCursorIntern(this, par, it.getPos());
+ text->setCursorIntern(this, &*pit, it.getPos());
it.getInset()->edit(this);
return theLockingInset()->lockInsetInInset(this, inset);
}
}
- par = par->next();
}
return false;
}
// make sure we update the combo !
owner()->setLayout(getLyXText()->cursor.par()->layout()->name());
// Tell the paragraph dialog that we changed paragraph
- owner()->getDialogs()->updateParagraph();
+ owner()->getDialogs().updateParagraph();
finishUndo();
return 0;
} else if (inset && theLockingInset() &&
theLockingInset()->unlockInsetInInset(this, inset)) {
// Tell the paragraph dialog that we changed paragraph
- owner()->getDialogs()->updateParagraph();
+ owner()->getDialogs().updateParagraph();
// owner inset has updated the layout combo
finishUndo();
return 0;