- hasFocus(): new pure virtual method
- redraw(): update singlePar only if the Widget has the focusInEvent
* GuiWorkArea.h: implement hasFocus().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15724
a592a061-630c-0410-9148-
cb99ea01b6c8
return;
}
- buffer_view_->updateMetrics(singlePar);
+ buffer_view_->updateMetrics(singlePar && hasFocus());
updateScrollbar();
///
BufferView const & bufferView() const;
+ /// \return true if has the keyboard input focus.
+ virtual bool hasFocus() const = 0;
+
/// return the width of the work area in pixels
virtual int width() const = 0;
///
GuiWorkArea(int width, int height, int id, LyXView & lyx_view);
+ ///
+ bool hasFocus() const { return QAbstractScrollArea::hasFocus(); }
+
/// return the width of the content pane
virtual int width() const { return viewport()->width(); }
/// return the height of the content pane