John Levon wrote: > Please do, it looks like we can regain a few percent from this
Does this betters out things... and uh... is correct? (Angus please check) Regards, Alfredo Index: BufferView_pimpl.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.373 diff -u -r1.373 BufferView_pimpl.C --- BufferView_pimpl.C 27 May 2003 17:28:57 -0000 1.373 +++ BufferView_pimpl.C 5 Jun 2003 19:21:18 -0000 @@ -1148,6 +1148,8 @@ } case LFUN_PARAGRAPH_UPDATE: { + if (!bv_->owner()->getDialogs().visible("paragraph")) + break; Paragraph const * par = &*bv_->getLyXText()->cursor.par(); if (!par) break; Index: frontends/Dialogs.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/Dialogs.C,v retrieving revision 1.23 diff -u -r1.23 Dialogs.C --- frontends/Dialogs.C 12 Mar 2003 22:17:48 -0000 1.23 +++ frontends/Dialogs.C 5 Jun 2003 19:21:24 -0000 @@ -74,13 +74,12 @@ Dialog * Dialogs::find(string const & name) { - if (!isValidName(name)) - return 0; - std::map<string, DialogPtr>::iterator it = dialogs_.find(name); if (it == dialogs_.end()) { + if (!isValidName(name)) + return 0; dialogs_[name] = DialogPtr(build(name)); return dialogs_[name].get(); } @@ -107,6 +106,16 @@ dialog->show(data); open_insets_[name] = inset; +} + + +bool Dialogs::visible(string const & name) const +{ + std::map<string, DialogPtr>::const_iterator it = + dialogs_.find(name); + if (it == dialogs_.end()) + return false; + return it->second.get()->isVisible(); } Index: frontends/Dialogs.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/Dialogs.h,v retrieving revision 1.84 diff -u -r1.84 Dialogs.h --- frontends/Dialogs.h 26 Mar 2003 12:17:18 -0000 1.84 +++ frontends/Dialogs.h 5 Jun 2003 19:21:25 -0000 @@ -119,6 +119,9 @@ */ void update(string const & name, string const & data); + /// is the dialog currently visible? + bool visible(string const & name) const; + /** All Dialogs of the given \param name will be closed if they are connected to the given \param inset. */ Index: insets/mailinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/mailinset.C,v retrieving revision 1.6 diff -u -r1.6 mailinset.C --- insets/mailinset.C 12 Mar 2003 22:17:50 -0000 1.6 +++ insets/mailinset.C 5 Jun 2003 19:21:40 -0000 @@ -29,8 +29,9 @@ void MailInset::updateDialog(BufferView * bv) const { - lyx::Assert(bv); - bv->owner()->getDialogs().update(name(), inset2string()); + lyx::Assert(bv); + if(bv->owner()->getDialogs().visible(name())) + bv->owner()->getDialogs().update(name(), inset2string()); }