http://bugzilla.lyx.org/show_bug.cgi?id=3064
http://bugzilla.lyx.org/show_bug.cgi?id=3065
* LyXView::currentWorkArea(): new access methods.
* ControlSpellchecker::check(): add a WorkArea::redraw() call to update the screen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16529
a592a061-630c-0410-9148-
cb99ea01b6c8
}
+// FIXME, there's only one WorkArea per LyXView possible for now.
+WorkArea const * LyXView::currentWorkArea() const
+{
+ return work_area_;
+}
+
+
+// FIXME, there's only one WorkArea per LyXView possible for now.
+WorkArea * LyXView::currentWorkArea()
+{
+ return work_area_;
+}
+
+
Buffer * LyXView::buffer() const
{
BOOST_ASSERT(work_area_);
std::vector<int> const & workAreaIds() const { return work_area_ids_; }
+ /// FIXME: rename to setCurrentWorkArea()
void setWorkArea(frontend::WorkArea * work_area);
+ /// return the current WorkArea (the one that has the focus).
+ frontend::WorkArea const * currentWorkArea() const;
+ /// FIXME: This non-const access is needed because of
+ /// a mis-designed \c ControlSpellchecker.
+ frontend::WorkArea * currentWorkArea();
+
/**
* This is called after the concrete view has been created.
* We have to have the toolbar and the other stuff created
#include "support/docstring.h"
#include "frontends/Alert.h"
+// FIXME: those two headers are needed because of the
+// WorkArea::redraw() call below.
+#include "frontends/lyxview.h"
+#include "frontends/WorkArea.h"
using std::advance;
using std::distance;
// 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...
+ kernel().lyxview().currentWorkArea()->redraw();
// set suggestions
if (res != SpellBase::OK && res != SpellBase::IGNORED_WORD) {