Fix initial cursor visibility problem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25322 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-06-19 13:10:25 +00:00
parent 963b2c48d4
commit f29a8f54a4

View File

@ -457,7 +457,7 @@ void BufferView::processUpdateFlags(Update::flags flags)
void BufferView::updateScrollbar()
{
if (height_ == 0)
if (height_ == 0 && width_ == 0)
return;
// We prefer fixed size line scrolling.
@ -1864,6 +1864,9 @@ bool BufferView::singleParUpdate()
void BufferView::updateMetrics()
{
if (height_ == 0 || width_ == 0)
return;
Text & buftext = buffer_.text();
pit_type const npit = int(buftext.paragraphs().size());
@ -2089,6 +2092,8 @@ Point BufferView::getPos(DocIterator const & dit, bool boundary) const
void BufferView::draw(frontend::Painter & pain)
{
if (height_ == 0 || width_ == 0)
return;
LYXERR(Debug::PAINTING, "\t\t*** START DRAWING ***");
Text & text = buffer_.text();
TextMetrics const & tm = d->text_metrics_[&text];