]> git.lyx.org Git - features.git/commitdiff
When zooming in/out with [Ctrl] + [Mouse Wheel], document WA's font is immediately...
authorTommaso Cucinotta <tommaso@lyx.org>
Wed, 6 Jan 2010 18:36:13 +0000 (18:36 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Wed, 6 Jan 2010 18:36:13 +0000 (18:36 +0000)
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

src/BufferList.cpp
src/BufferList.h
src/frontends/qt4/GuiApplication.cpp

index 422457d0bb20d091bb8fb7a58252e53f3f302756..70c15c18abb25176d84846a43af93d3631ebdc0d 100644 (file)
@@ -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
index c703cd2a04cddd83ae7840336cc3d76de0d30567..61803ced2095a39ab3a193c816c3aa4fb3c7c8a7 100644 (file)
@@ -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 &);
index db7b4042cd7aebae0a6d32acca0f2e533b8d2e0c..8c88b5fe953139969b0b8ebac9517480ba704fc0 100644 (file)
@@ -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;