]> git.lyx.org Git - features.git/commit
This commit fixes 3 crashes when reverting a document:
authorAbdelrazak Younes <younes@lyx.org>
Thu, 26 Oct 2006 13:29:10 +0000 (13:29 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 26 Oct 2006 13:29:10 +0000 (13:29 +0000)
commit128a8ef3e86fedf60b2a123da089898994f4211e
tree7f0b26eaf16288a751670b64e701a635a7f05280
parentb6a7dd3aa713639d53b4f29d13d7c9240355843c
This commit fixes 3 crashes when reverting a document:

1) crash in GuiWorkArea::paintEvent(), this one is solved by by encapsulating the file loading in LyXView by busy(true)/busy(false) and by disabling/enabling the work area update in GuiView::busy().

2) crash in the cursor blinking because the cursor is timed out at the moment you click on "Revert". So the blinking cursor is now disabled/enabled in GuiView::busy().

3) crash in BufferView::setBuffer() because the current buffer was already closed folling the "revert" command.
* BufferView::loadLyXFile(): set buffer_ to 0 in case of a reload (when document is reverted)

* LyXView:
  - busy() is not const anymore (work_area_ is modified in GuiView)
  - loadLyXFile(): encapsulate the file loading with busy(true)/busy(false)
  - setBuffer(): encapsulate the buffer-switching with busy(true)/busy(false)

* GuiView::busy()
  - disable/enable workarea updates.
  - disable/enable blinking cursor.

* WorkArea: new startBlinkingCursor() and stopBlinkingCursor() methods.

* rowpainter.C:
  - paintText(): make sure there is a Buffer from which to paint.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15556 a592a061-630c-0410-9148-cb99ea01b6c8
src/BufferView.C
src/frontends/LyXView.C
src/frontends/LyXView.h
src/frontends/WorkArea.C
src/frontends/WorkArea.h
src/frontends/qt4/GuiView.C
src/frontends/qt4/GuiView.h
src/rowpainter.C