* WorkArea

- 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
This commit is contained in:
Abdelrazak Younes 2006-11-04 07:29:25 +00:00
parent f8b75dc40f
commit 5c57bee5b9
3 changed files with 7 additions and 1 deletions

View File

@ -148,7 +148,7 @@ void WorkArea::redraw(bool singlePar)
return;
}
buffer_view_->updateMetrics(singlePar);
buffer_view_->updateMetrics(singlePar && hasFocus());
updateScrollbar();

View File

@ -65,6 +65,9 @@ public:
///
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;

View File

@ -94,6 +94,9 @@ public:
///
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