X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView_pimpl.C;h=34b5a478e357034a93c92d4a0ff62c214eb557a7;hb=498f06d43a0f2000c3f704db1ea39fda3c819fe6;hp=eed37837d34144bc438c43f006798ec08974fd9e;hpb=99d1627a471b92f403598d03dfc861ddc3c11be0;p=lyx.git diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index eed37837d3..34b5a478e3 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -170,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_) { @@ -263,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) { @@ -328,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(); @@ -354,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()); } @@ -374,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((bv_->text->first_y + height)); int const last = static_cast((bv_->text->first_y + workarea().workHeight() - height)); @@ -392,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; @@ -404,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()); }