mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
* 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:
parent
f8b75dc40f
commit
5c57bee5b9
@ -148,7 +148,7 @@ void WorkArea::redraw(bool singlePar)
|
||||
return;
|
||||
}
|
||||
|
||||
buffer_view_->updateMetrics(singlePar);
|
||||
buffer_view_->updateMetrics(singlePar && hasFocus());
|
||||
|
||||
updateScrollbar();
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user