Add missing call to WorkArea::redraw(). Fix bug 3078

http://bugzilla.lyx.org/show_bug.cgi?id=3078


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16588 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-07 22:01:50 +00:00
parent 03f56201d8
commit 000df02671
3 changed files with 15 additions and 4 deletions

View File

@ -27,6 +27,11 @@
#include "lyxtextclasslist.h"
#include "tex-strings.h"
// FIXME: those two headers are needed because of the
// WorkArea::redraw() call below.
#include "frontends/LyXView.h"
#include "frontends/WorkArea.h"
#include <sstream>
using std::ostringstream;
@ -139,9 +144,9 @@ void ControlDocument::dispatchParams()
kernel().dispatch(FuncRequest(LFUN_ALL_INSETS_TOGGLE,
"assign branch"));
}
// update the bufferview
// If we used an LFUN, we would not need that
// FIXME: If we used an LFUN, we would not need those two lines:
kernel().bufferview()->update();
kernel().lyxview().currentWorkArea()->redraw();
}

View File

@ -19,6 +19,11 @@
#include "paragraph.h"
#include "pariterator.h"
// FIXME: those two headers are needed because of the
// WorkArea::redraw() call below.
#include "frontends/LyXView.h"
#include "frontends/WorkArea.h"
#include "support/lstrings.h"
using lyx::support::bformat;
@ -87,8 +92,9 @@ void ControlErrorList::goTo(int item)
pos_type const range = end - start;
DocIterator const dit = makeDocIterator(pit, start);
kernel().bufferview()->putSelectionAt(dit, range, false);
// If we used an LFUN, we would not need that
// FIXME: If we used an LFUN, we would not need those two lines:
kernel().bufferview()->update();
kernel().lyxview().currentWorkArea()->redraw();
}
} // namespace frontend

View File

@ -252,7 +252,7 @@ void ControlSpellchecker::check()
int const size = cur.selEnd().pos() - cur.selBegin().pos();
cur.pos() -= size;
kernel().bufferview()->putSelectionAt(cur, size, false);
// if we used a lfun like in find/replace, dispatch would do
// FIXME: if we used a lfun like in find/replace, dispatch would do
// that for us
kernel().bufferview()->update();
// FIXME: this Controller is very badly designed...