- do not attempt to toggle math insets via ALL_INSETS_TOGGLE
(fixes bug 3358)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17756
a592a061-630c-0410-9148-
cb99ea01b6c8
InsetIterator it = inset_iterator_begin(inset);
InsetIterator const end = inset_iterator_end(inset);
for (; it != end; ++it) {
- if (inset_code == InsetBase::NO_CODE
- || inset_code == it->lyxCode()) {
+ if (!it->asInsetMath()
+ && (inset_code == InsetBase::NO_CODE
+ || inset_code == it->lyxCode())) {
LCursor tmpcur = cur;
tmpcur.pushLeft(*it);
it->dispatch(tmpcur, fr);