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
use position returned by BufferView
src/bufferview_funcs.C:
adjust cursor x-position by hand
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15555 a592a061-630c-0410-9148-cb99ea01b6c8
Now we can parse all commands that could be parsed in the old
InsetCommandParams
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15551 a592a061-630c-0410-9148-cb99ea01b6c8
- enable by default, could be disabled with -Ddisable-pch
- use different pch files for Debug/Release/...
- use only one config_pch.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15549 a592a061-630c-0410-9148-cb99ea01b6c8
* src/*.C:
* src/insets/*.C: implement rejectChanges() in analogy to
acceptChanges();
* src/paragraph_pimpl.C: add assertions for pos, start, and
end parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15542 a592a061-630c-0410-9148-cb99ea01b6c8
* qt4/Alert_pimpl.C: make sure the proper Qt attributes are set.
* GuiApplication::quitLyx(): add the "force" argument to the funcRequest.
* GuiImplementation:
- GuiImplementation(): remove the signal connection. This was triggered after the LastWindowClosed signal so was not useful.
- cleanupViews(): renamed to unregisterView() and handle the WorkAreas as well.
- closeAll(): new method (from LyXView).
* GuiView.C
- clean up the includes order.
- closeEvent(): make sure that theBufferList().quitWriteAll() is called if last window closed.
* lyx_main.C / LyX::quit():
- remove noAsk argument
- delete bufferList::quitWriteAll() call (this is handled in the frontend).
- delete Session stuff (ditto)
* LyXFunc::dispatch()
- LFUN_LYX_EXIT: close all window before exiting from user command (as opposed to last window closed).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15535 a592a061-630c-0410-9148-cb99ea01b6c8
- only precompile boost and stl headers
- for qt4 also precompile QtGui and QtGui
- don't use one global precomiled header file
to get out of the dependency hell
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15517 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXFunc:
- dispatch(): transfer assertion on lyx_view_ to each LFUN on a case by case basis.
- dispatch(): new LFUN_WINDOW_CLOSE
- getStatus(): special treatment for LFUN_LYX_QUIT
* LyX:
- views_, addLyXView(): deleted
- quit(): call saveGeometry() on each LyXView before exiting.
* GuiApplication:
- is now a QObject.
- quitLyX(): new Qt slot for lastWindowClosed signal.
* Gui.h:
- destroyView(), destroyWorkArea(): deleted
- viewIds(): new method
* GuiImplementation:
- implement above changes.
- GuiImplementation is now a QObject
- cleanupViews(): new private slot.
- buildViewIds(): new helper method
- views_ and work_areas_ are now maps of raw pointers instead of schared_ptr.
* LyXView
- now stores its id.
- dispatch(): special treatment for LFUN_WINDOW_CLOSE.
- workAreaIds(): new method.
- close(): new pure virtual method.
- saveGeometry(): new pure virtual method.
* GuiView:
- implements above changes.
- GuiView(): set WA_DeleteOnClose and Qt::WA_QuitOnClose to let Qt manage the destruction on close().
- closeEvent(): session stuff transfered to saveGeometry()
* WorkArea
- now store its id.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15514 a592a061-630c-0410-9148-cb99ea01b6c8
- Various micro-optimisations
- Revert Abdel's repaint instead of update for QPainter
- Get rid of unused methods in GuiWorkArea
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15491 a592a061-630c-0410-9148-cb99ea01b6c8