]> git.lyx.org Git - features.git/commitdiff
This commit moves the busy cursor and formatting message handling from BufferView...
authorAbdelrazak Younes <younes@lyx.org>
Thu, 17 Aug 2006 22:00:07 +0000 (22:00 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 17 Aug 2006 22:00:07 +0000 (22:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14799 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/frontends/WorkArea.C

index b63b126659a1669c87734d7a0708ce9ab57f7dcd..4290cbb710bfdd33a868559405bd0f388b374e2a 100644 (file)
@@ -330,8 +330,6 @@ string BufferView::Pimpl::firstLayout()
 void BufferView::Pimpl::resizeCurrentBuffer()
 {
        lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION << endl;
-       owner_->busy(true);
-       owner_->message(_("Formatting document..."));
 
        LyXText * text = bv_->text();
        if (!text)
@@ -339,12 +337,7 @@ void BufferView::Pimpl::resizeCurrentBuffer()
 
        text->init(bv_);
        update();
-
        switchKeyMap();
-       owner_->busy(false);
-
-       // Reset the "Formatting..." message
-       owner_->clearMessage();
 }
 
 
@@ -532,7 +525,7 @@ void BufferView::Pimpl::workAreaResize(int width, int height)
        height_ = height;
 
        if (buffer_ && widthChange) {
-               // The visible LyXView need a resize
+               // The WorkArea content needs a resize
                resizeCurrentBuffer();
        }
 
index 277e3ee560dd15d016f7b482d0f5e5f447158470..6b1f61e66de09263503547c23e8b0742ba096662 100644 (file)
@@ -42,6 +42,7 @@
 #include "graphics/GraphicsImage.h"
 #include "graphics/GraphicsLoader.h"
 
+#include "gettext.h"
 #include "support/filetools.h" // LibFileSearch
 #include "support/forkedcontr.h"
 
@@ -265,9 +266,13 @@ void WorkArea::dispatch(FuncRequest const & cmd0)
 
 void WorkArea::resizeBufferView()
 {
+       lyx_view_.busy(true);
+       lyx_view_.message(_("Formatting document..."));
        buffer_view_->workAreaResize(width(), height());
        lyx_view_.updateLayoutChoice();
        redraw();
+       lyx_view_.busy(false);
+       lyx_view_.clearMessage();
 }