bv_->text->status(bv_, st);
screen_->update(bv_->text, bv_);
}
+ // do this here instead of in the screen::update because of
+ // the above loop!
+ bv_->text->status(bv_, LyXText::UNCHANGED);
if (fitc)
fitCursor();
}
+2001-08-03 Juergen Vigna <jug@sad.it>
+
+ * insettext.C (setFont): don't call for a draw update if we're just
+ changing the cursor font!
+
2001-08-02 Juergen Vigna <jug@sad.it>
* insettext.C (draw): clear the background with the right color if
the_locking_inset->setFont(bv, font, toggleall, selectall);
return;
}
+ if ((!par->next() && !par->size()) || !cpar(bv)->size()) {
+ getLyXText(bv)->setFont(bv, font, toggleall);
+ return;
+ }
bool clear = false;
if (!lt) {
lt = getLyXText(bv);
void LyXScreen::update(LyXText * text, BufferView * bv,
- int y_offset, int x_offset)
+ int y_offset, int x_offset)
{
switch (text->status()) {
case LyXText::NEED_MORE_REFRESH:
int const y = max(int(text->refresh_y - text->first), 0);
drawFromTo(text, bv, y, owner.height(), y_offset, x_offset);
text->refresh_y = 0;
- text->status(bv, LyXText::UNCHANGED);
+ // otherwise this is called ONLY from BufferView_pimpl(update)
+ // or we should see to set this flag accordingly
+ if (text != bv->text)
+ text->status(bv, LyXText::UNCHANGED);
expose(0, y, owner.workWidth(), owner.height() - y);
}
break;
// this because if we had a major update the refresh_row could
// have been set to 0!
if (text->refresh_row) {
- text->status(bv, LyXText::UNCHANGED);
+ // otherwise this is called ONLY from BufferView_pimpl(update)
+ // or we should see to set this flag accordingly
+ if (text != bv->text)
+ text->status(bv, LyXText::UNCHANGED);
expose(0, text->refresh_y - text->first + y_offset,
owner.workWidth(), text->refresh_row->height());
}
// Determine basis font
LyXFont layoutfont;
if (cursor.pos() < beginningOfMainBody(bview->buffer(),
- cursor.par()))
+ cursor.par()))
+ {
layoutfont = getFont(bview->buffer(), cursor.par(),-2);
- else
+ } else {
layoutfont = getFont(bview->buffer(), cursor.par(),-1);
+ }
// Update current font
real_current_font.update(font, toggleall);
// and sel_end cursor
setUndo(bview, Undo::EDIT,
- selection.start.par(),
- selection.end.par()->next());
+ selection.start.par(), selection.end.par()->next());
freezeUndo();
cursor = selection.start;
while (cursor.par() != selection.end.par() ||
- (cursor.pos() < selection.end.pos())) {
+ (cursor.pos() < selection.end.pos()))
+ {
if (cursor.pos() < cursor.par()->size()) {
// an open footnote should behave
// like a closed one
clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true,
- tmpcursor.boundary());
+ tmpcursor.boundary());
}