mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Move the screen redraw call out of the selection-setting routine. This
avoids multiple screen redraws in some cases. If someone knows how to fix the FIXMEs in GuiErrorList and GuiSpellcheker, I'd really appreciate it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35651 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3af1fa5abb
commit
b1df2bd306
@ -1532,9 +1532,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
istringstream iss(to_utf8(cmd.argument()));
|
||||
iss >> opt;
|
||||
if (findAdv(this, opt))
|
||||
cur.dispatched();
|
||||
else
|
||||
cur.undispatched();
|
||||
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2344,9 +2342,6 @@ void BufferView::putSelectionAt(DocIterator const & cur,
|
||||
} else
|
||||
d->cursor_.setSelection(d->cursor_, length);
|
||||
}
|
||||
// Ensure a redraw happens in any case because the new selection could
|
||||
// possibly be on the same screen as the previous selection.
|
||||
processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
}
|
||||
|
||||
|
||||
|
@ -180,8 +180,9 @@ bool GuiErrorList::goTo(int item)
|
||||
pos_type const range = end - start;
|
||||
dit.pos() = start;
|
||||
BufferView * bv = const_cast<BufferView *>(bufferview());
|
||||
// FIXME: If we used an LFUN, we would not need this line:
|
||||
// FIXME: If we used an LFUN, we would not need these lines:
|
||||
bv->putSelectionAt(dit, range, false);
|
||||
bv->processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -325,10 +325,12 @@ void GuiSpellchecker::check()
|
||||
d->ui.languageCO->setCurrentIndex(pos);
|
||||
|
||||
// FIXME: if we used a lfun like in find/replace, dispatch would do
|
||||
// that for us
|
||||
// all of this for us
|
||||
int const size = to.pos() - from.pos();
|
||||
BufferView * bv = const_cast<BufferView *>(bufferview());
|
||||
bv->putSelectionAt(from, size, false);
|
||||
bv->processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user