#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "BufferView_pimpl.h"
#include "frontends/WorkArea.h"
#include "frontends/screen.h"
// 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_) {
bool selection = false;
bool mark_set = false;
- owner_->prohibitInput();
-
+ owner_->busy(true);
+
owner_->message(_("Formatting document..."));
if (bv_->text) {
bv_->text->first_y = screen().topCursorVisible(bv_->text->cursor, bv_->text->first_y);
switchKeyMap();
- owner_->allowInput();
+ owner_->busy(false);
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());
}
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));
}
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;
scrollDocView(new_first_y);
// Update the scrollbar.
- workarea().setScrollbarParams(t->height, t->first_y, t->defaultHeight());
+ workarea().setScrollbarParams(t->height, t->first_y, defaultRowHeight());
}