]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
fix compilation bug
[lyx.git] / src / BufferView_pimpl.C
index 0178c990b967e713e8826b49f502ae211ab76e07..34b5a478e357034a93c92d4a0ff62c214eb557a7 100644 (file)
@@ -8,10 +8,6 @@
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "BufferView_pimpl.h"
 #include "frontends/WorkArea.h"
 #include "frontends/screen.h"
@@ -174,7 +170,9 @@ void BufferView::Pimpl::buffer(Buffer * b)
        // set current buffer
        buffer_ = b;
 
-       if (bufferlist.getState() == BufferList::CLOSING) return;
+       // if we're quitting lyx, don't bother updating stuff 
+       if (quitting)
+               return; 
 
        // if we are closing the buffer, use the first buffer as current
        if (!buffer_) {
@@ -267,8 +265,8 @@ int BufferView::Pimpl::resizeCurrentBuffer()
        bool selection = false;
        bool mark_set  = false;
 
-       owner_->prohibitInput();
-
+       owner_->busy(true);
        owner_->message(_("Formatting document..."));
 
        if (bv_->text) {
@@ -332,7 +330,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
        bv_->text->first_y = screen().topCursorVisible(bv_->text->cursor, bv_->text->first_y);
 
        switchKeyMap();
-       owner_->allowInput();
+       owner_->busy(false);
 
        updateScrollbar();
 
@@ -358,9 +356,9 @@ void BufferView::Pimpl::updateScrollbar()
        LyXText const & t = *bv_->text;
 
        lyxerr[Debug::GUI] << "Updating scrollbar: h " << t.height << ", first_y "
-               << t.first_y << ", default height " << t.defaultHeight() << endl;
+               << t.first_y << ", default height " << defaultRowHeight() << endl;
 
-       workarea().setScrollbarParams(t.height, t.first_y, t.defaultHeight());
+       workarea().setScrollbarParams(t.height, t.first_y, defaultRowHeight());
 }
 
 
@@ -378,7 +376,7 @@ void BufferView::Pimpl::scrollDocView(int value)
 
        LyXText * vbt = bv_->text;
 
-       int const height = vbt->defaultHeight();
+       int const height = defaultRowHeight();
        int const first = static_cast<int>((bv_->text->first_y + height));
        int const last = static_cast<int>((bv_->text->first_y + workarea().workHeight() - height));
 
@@ -396,7 +394,7 @@ void BufferView::Pimpl::scroll(int lines)
        }
 
        LyXText const * t = bv_->text;
-       int const line_height = t->defaultHeight();
+       int const line_height = defaultRowHeight();
 
        // The new absolute coordinate
        int new_first_y = t->first_y + lines * line_height;
@@ -408,7 +406,7 @@ void BufferView::Pimpl::scroll(int lines)
        scrollDocView(new_first_y);
 
        // Update the scrollbar.
-       workarea().setScrollbarParams(t->height, t->first_y, t->defaultHeight());
+       workarea().setScrollbarParams(t->height, t->first_y, defaultRowHeight());
 }