Index: src/wp/ap/xp/ap_Dialog_Latex.h =================================================================== --- src/wp/ap/xp/ap_Dialog_Latex.h (revision 23366) +++ src/wp/ap/xp/ap_Dialog_Latex.h (working copy) @@ -58,6 +58,7 @@ private: UT_UTF8String m_sLatex; UT_UTF8String m_sMathML; + UT_UTF8String m_sBackupLatex; }; #endif /* AP_DIALOG_LATEX_H */ Index: src/wp/ap/xp/ap_Dialog_Latex.cpp =================================================================== --- src/wp/ap/xp/ap_Dialog_Latex.cpp (revision 23366) +++ src/wp/ap/xp/ap_Dialog_Latex.cpp (working copy) @@ -102,12 +102,18 @@ void AP_Dialog_Latex::fillLatex(UT_UTF8String & sLatex) { - setLatex(sLatex); + if (m_sBackupLatex.size()) + m_sBackupLatex.clear(); + m_sBackupLatex += sLatex; + setLatex(sLatex); setLatexInGUI(); } void AP_Dialog_Latex::insertIntoDoc(void) { + if (m_sBackupLatex.size() == m_sLatex.size()) + if (m_sBackupLatex == m_sLatex) + return; XAP_Frame * pFrame = getActiveFrame(); FV_View * pView = static_cast(pFrame->getCurrentView()); pView->cmdInsertLatexMath(m_sLatex,m_sMathML);