#include "frontends/alert.h"
#include "frontends/FileDialog.h"
#include "frontends/FontMetrics.h"
+#include "frontends/Selection.h"
#include "graphics/Previews.h"
}
-void BufferView::setBuffer(Buffer * b)
+Buffer * BufferView::setBuffer(Buffer * b)
{
LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION
<< "[ b = " << b << "]" << endl;
// If we're quitting lyx, don't bother updating stuff
if (quitting) {
buffer_ = 0;
- return;
+ return 0;
}
//FIXME Fix for bug 3440 is here.
offset_ref_ = 0;
if (!buffer_)
- return;
+ return 0;
LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION
<< "Buffer addr: " << buffer_ << endl;
if (graphics::Previews::status() != LyXRC::PREVIEW_OFF)
graphics::Previews::get().generateBufferPreviews(*buffer_);
+ return buffer_;
}
if (!cur.result().dispatched())
cur.dispatch(cmd);
+ //Do we have a selection?
+ theSelection().haveSelection(cursor().selection());
+
// Redraw if requested and necessary.
if (cur.result().dispatched() && cur.result().update())
return update(cur.result().update());