From 000df02671cb44f1bea963e862607b417b22e970 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 7 Jan 2007 22:01:50 +0000 Subject: [PATCH] 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 --- src/frontends/controllers/ControlDocument.C | 9 +++++++-- src/frontends/controllers/ControlErrorList.C | 8 +++++++- src/frontends/controllers/ControlSpellchecker.C | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/frontends/controllers/ControlDocument.C b/src/frontends/controllers/ControlDocument.C index 7683609af6..6ec41192b8 100644 --- a/src/frontends/controllers/ControlDocument.C +++ b/src/frontends/controllers/ControlDocument.C @@ -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 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(); } diff --git a/src/frontends/controllers/ControlErrorList.C b/src/frontends/controllers/ControlErrorList.C index 5b4f9e69a6..6e572ab4c1 100644 --- a/src/frontends/controllers/ControlErrorList.C +++ b/src/frontends/controllers/ControlErrorList.C @@ -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 diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index bb02eda90f..feb3672bf0 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -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...