From: Tommaso Cucinotta Date: Wed, 6 Jan 2010 18:36:13 +0000 (+0000) Subject: When zooming in/out with [Ctrl] + [Mouse Wheel], document WA's font is immediately... X-Git-Tag: 2.0.0~4562 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=78874e5f2766972d00743550d0de099c1387d4b3;p=features.git When zooming in/out with [Ctrl] + [Mouse Wheel], document WA's font is immediately updated, but if the Advanced F&R dialog is shown, its own WAs' font (find WA and replace WA) is not immediately updated, but delayed until the next editing action. This commit fixes such behaviour, and performs the update immediately. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32794 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferList.cpp b/src/BufferList.cpp index 422457d0bb..70c15c18ab 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -336,4 +336,17 @@ bool BufferList::releaseChild(Buffer * parent, Buffer * child) } +void BufferList::changed() const +{ + BufferStorage::const_iterator it = bstore.begin(); + BufferStorage::const_iterator end = bstore.end(); + for (; it != end; ++it) + (*it)->changed(); + it = binternal.begin(); + end = binternal.end(); + for (; it != end; ++it) + (*it)->changed(); +} + + } // namespace lyx diff --git a/src/BufferList.h b/src/BufferList.h index c703cd2a04..61803ced20 100644 --- a/src/BufferList.h +++ b/src/BufferList.h @@ -108,6 +108,9 @@ public: /// reset current author for all buffers void setCurrentAuthor(docstring const & name, docstring const & email); + /// Call changed() on all buffers, internal or not + void changed() const; + private: /// noncopiable BufferList(BufferList const &); diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index db7b4042cd..8c88b5fe95 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -949,10 +949,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) // Set current_view_ to zero to forbid GuiWorkArea::redraw() // to skip the refresh. current_view_ = 0; - BufferList::iterator it = theBufferList().begin(); - BufferList::iterator const end = theBufferList().end(); - for (; it != end; ++it) - (*it)->changed(); + theBufferList().changed(); // Restore current_view_ current_view_ = view; break;