* buffer.h: changed() signal now emit a singlePar boolean.
* WorkArea::redraw(): acknowledge singlePar changed() boolean
* LyXView.C: adapt signal connection to changed() signal change.
* lyxfunc.C: transmit the singlePar flag with the Buffer::changed() signal.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15702
a592a061-630c-0410-9148-
cb99ea01b6c8
bool hasParWithID(int id) const;
/// This signal is emitted when the buffer is changed.
- boost::signal<void()> changed;
+ boost::signal<void(bool)> changed;
/// This signal is emitted when some parsing error shows up.
boost::signal<void(std::string)> errors;
/// This signal is emitted when some message shows up.
bufferChangedConnection_ =
buf.changed.connect(
- boost::bind(&WorkArea::redraw, work_area_));
+ boost::bind(&WorkArea::redraw, work_area_, _1));
errorsConnection_ =
buf.errors.connect(
}
-void WorkArea::redraw()
+void WorkArea::redraw(bool singlePar)
{
if (!buffer_view_)
return;
return;
}
- buffer_view_->updateMetrics(false);
+ buffer_view_->updateMetrics(singlePar);
updateScrollbar();
virtual void setScrollbarParams(int height, int pos, int line_height) = 0;
/// redraw the screen, without using existing pixmap
- virtual void redraw();
+ virtual void redraw(bool singlePar = false);
///
void checkAndGreyOut();
///
needSecondUpdate = view()->fitCursor();
if (needSecondUpdate || updateFlags != Update::None) {
- view()->buffer()->changed();
+ view()->buffer()->changed(updateFlags & Update::SinglePar);
}
lyx_view_->updateStatusBar();