]> git.lyx.org Git - lyx.git/log
lyx.git
3 months agoCmake build: Make QT5-compilation be default
Kornel Benko [Sat, 6 Apr 2024 10:36:47 +0000 (12:36 +0200)]
Cmake build: Make QT5-compilation be default

(cherry picked from commit c971974f331c249fa4d57953d8d93c107c154024)

3 months agoMerge branch '2.4.x' into 2.4.1-devel
Richard Kimberly Heck [Mon, 3 Jun 2024 01:49:54 +0000 (21:49 -0400)]
Merge branch '2.4.x' into 2.4.1-devel

3 months agoPut new citation after selected item rather than at end of list.
Richard Kimberly Heck [Sun, 2 Jun 2024 00:25:20 +0000 (20:25 -0400)]
Put new citation after selected item rather than at end of list.

Fixes bug #12940.

Patch from Daniel.

(cherry picked from commit 40ae8644f9f81576033ff1f8f56428946029b4f4)

3 months agoXHTML: export paragraph IDs also for list items, but not for the opening tag of the...
Thibaut Cuvelier [Mon, 20 May 2024 01:21:00 +0000 (03:21 +0200)]
XHTML: export paragraph IDs also for list items, but not for the opening tag of the list.

The IDs are used to link to specific elements (for instance, the User's guide nomenclature).

The beginning of the list (<ul> or <ol>) has the same magic ID as the first item of the list.

3 months agoMake comment clearer.
Thibaut Cuvelier [Sat, 18 May 2024 17:38:52 +0000 (19:38 +0200)]
Make comment clearer.

3 months agoInsetInfo: no need to output + explicitly in a shortcut, it is already contained...
Thibaut Cuvelier [Sat, 18 May 2024 17:41:44 +0000 (19:41 +0200)]
InsetInfo: no need to output + explicitly in a shortcut, it is already contained in the sequence.

3 months agoOne more
Richard Kimberly Heck [Sun, 2 Jun 2024 00:24:15 +0000 (20:24 -0400)]
One more

3 months agoStatus for last few commits
Richard Kimberly Heck [Sun, 2 Jun 2024 00:23:08 +0000 (20:23 -0400)]
Status for last few commits

3 months agoFix display of math hull inset in RTL context
Jean-Marc Lasgouttes [Thu, 16 May 2024 12:56:28 +0000 (14:56 +0200)]
Fix display of math hull inset in RTL context

The inversion of margin was done in the wrong way for RTL support.

(cherry picked from commit b469c142ad579d3338fc81ab3e1c6ee7b4e270ec)

3 months agoFix bug #12934
Richard Kimberly Heck [Sat, 1 Jun 2024 17:05:12 +0000 (13:05 -0400)]
Fix bug #12934

(cherry picked from commit 6484dce51b46f8fc0134a7532efb08401bba3c53)

3 months agoSet buffer when creating a MathData from parts of another one
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 15:13:15 +0000 (17:13 +0200)]
Set buffer when creating a MathData from parts of another one

This is triggered by selecting part of an equation under Xcb platform
(x11). Indeed, the current selection has to be sent to the X11 server
and BufferView::requestSelection() is called. Eventually
cap::grabSelection() is the function that creates this partial
MathData object.

Fixes ticket #12947.

(cherry picked from commit ed2f3cb9cfa1e871d48a92d41791a77bd218ab67)

3 months agoTry to make sure that math insets have a properly set buffer_ member
Jean-Marc Lasgouttes [Fri, 14 Oct 2022 20:42:21 +0000 (22:42 +0200)]
Try to make sure that math insets have a properly set buffer_ member

Set the buffer of contents that is added to a MathData object through
MathData::insert() (both versions)
MathData::push_back()
asArray()

Also in math macros, initialize look_ with the relevant buffer.

This reduces the number of insets hat do not have a proper buffer.

See #13050 for discussion of this issue.

(cherry picked from commit f3c5ff9cb72c5231f1e1e81452e67d6f12dadecb)

3 months agoFix bug #11796.
Richard Kimberly Heck [Sat, 1 Jun 2024 16:43:56 +0000 (12:43 -0400)]
Fix bug #11796.

Toolbars are now locked by default. Unlocked state should be saved
by Qt as a session variable.

Patch from Daniel.

(cherry picked from commit 42a8463aab6100e8209caa8cd137d3c500623729)

3 months agoFix bug #8856.
Richard Kimberly Heck [Sat, 1 Jun 2024 16:36:00 +0000 (12:36 -0400)]
Fix bug #8856.

Show values of cross-references in tooltips.

(cherry picked from commit 2a1c3dce57da0ad25451fc61f413ebbeba2448fe)

3 months agoFix bug #12981
Richard Kimberly Heck [Sat, 1 Jun 2024 15:52:05 +0000 (11:52 -0400)]
Fix bug #12981

(cherry picked from commit 61181a39778ed5bcd7849ab388c402ab3f88d5cd)

3 months agoReset require_fresh_start_ after buffer has been viewed/exported
Juergen Spitzmueller [Sat, 1 Jun 2024 07:06:44 +0000 (09:06 +0200)]
Reset require_fresh_start_ after buffer has been viewed/exported

The LFUN buffer-reset-export states to start afresh the export for the
next run, but in fact, the boolean was never reset, so that this was
done for all subsequent runs unless the buffer had been closed and
reopened.

Now the lfun does what it states and only acts on the next pass.

(cherry picked from commit e1cb15ee5d9377cef6e3683a6d0bb68eb9b379c1)

3 months agoUpdate sk.po
Kornel Benko [Sat, 1 Jun 2024 12:06:26 +0000 (14:06 +0200)]
Update sk.po

3 months agoAmend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
Kornel Benko [Fri, 31 May 2024 07:15:59 +0000 (09:15 +0200)]
Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols

Restrict the removing to math insets

(cherry picked from commit f248b003a9f7b8b16c85c04ae37b3c5e27a4a8d6)

3 months agoFindAdv: sometimes a space is added on some math symbols
Kornel Benko [Wed, 29 May 2024 12:09:20 +0000 (14:09 +0200)]
FindAdv: sometimes a space is added on some math symbols

For example '\int '.
Should fix regression #13070
Spotted  by Alexander Dunlap

(cherry picked from commit 4730ec78f544b6fd51defd063e52955554b14e89)
(cherry picked from commit 6c3447c8a62d1ed9c8e17732f991296123c69efb)

3 months agoBegin 2.4.1 development
Richard Kimberly Heck [Fri, 31 May 2024 23:43:36 +0000 (19:43 -0400)]
Begin 2.4.1 development

3 months agoMinor update
Richard Kimberly Heck [Fri, 31 May 2024 23:41:22 +0000 (19:41 -0400)]
Minor update

3 months agoAmend 4730ec78: FindAdv: sometimes a space is added on some math symbols
Kornel Benko [Fri, 31 May 2024 07:07:19 +0000 (09:07 +0200)]
Amend 4730ec78: FindAdv: sometimes a space is added on some math symbols

Restrict the removing to math insets

3 months agoNew status file, and status for last commit
Richard Kimberly Heck [Wed, 29 May 2024 14:49:58 +0000 (10:49 -0400)]
New status file, and status for last commit

3 months agoFindAdv: sometimes a space is added on some math symbols
Kornel Benko [Wed, 29 May 2024 12:09:20 +0000 (14:09 +0200)]
FindAdv: sometimes a space is added on some math symbols

For example '\int '.
Should fix regression #13070
Spotted  by Alexander Dunlap

3 months agoWininstaller Qt6.7 changed file name 2.4.0
Eugene Chornyi [Sun, 26 May 2024 07:35:10 +0000 (09:35 +0200)]
Wininstaller Qt6.7 changed file name

(cherry picked from commit a6d0d7ea92b686fc102b05970830ee11fc51e47b)

3 months agoRemerge strings.
Richard Kimberly Heck [Sat, 25 May 2024 21:50:58 +0000 (17:50 -0400)]
Remerge strings.

3 months agoNew 2.4.0 release
Richard Kimberly Heck [Sat, 25 May 2024 21:50:41 +0000 (17:50 -0400)]
New 2.4.0 release

3 months agoCmake build: Initialize variable 'CMAKE_INSTALL_PREFIX' before use
Kornel Benko [Fri, 24 May 2024 18:26:04 +0000 (20:26 +0200)]
Cmake build: Initialize variable 'CMAKE_INSTALL_PREFIX' before use

Spotted by Eugene Chornyi <yu_jin@lyx.org>

3 months agoInsetNote: pass on inset-modify lfuns addressed at other insets (#13068)
Juergen Spitzmueller [Fri, 24 May 2024 12:19:18 +0000 (14:19 +0200)]
InsetNote: pass on inset-modify lfuns addressed at other insets (#13068)

(cherry picked from commit ae1ddcbda0615b742184f4263cd1ad550eb38c32)

4 months agoUpdate status
Juergen Spitzmueller [Mon, 20 May 2024 16:01:33 +0000 (18:01 +0200)]
Update status

4 months agoAddress Qt 6.7 deprecation warning
Juergen Spitzmueller [Mon, 20 May 2024 07:49:10 +0000 (09:49 +0200)]
Address Qt 6.7 deprecation warning

(cherry picked from commit 44633c7f729e79ea023f2a5ccbbdd0002411619f)

4 months agoInitialize is_long_tabular before updateIndexes() (which employs it)
Juergen Spitzmueller [Mon, 20 May 2024 06:50:39 +0000 (08:50 +0200)]
Initialize is_long_tabular before updateIndexes() (which employs it)

(cherry picked from commit 10b5f03d95dca8f3e8c225aa2deca4d473f8b169)

4 months agoUpdate aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments
Juergen Spitzmueller [Mon, 20 May 2024 14:10:23 +0000 (16:10 +0200)]
Update aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments

(cherry picked from commit d3d8b3d748f03ebafd477570291264961e22c7c4)

4 months ago*RELEASE-NOTES: add cprotect
Pavel Sanda [Sun, 19 May 2024 23:08:16 +0000 (01:08 +0200)]
*RELEASE-NOTES: add cprotect

4 months agoReturn a reference, not a copy.
Richard Kimberly Heck [Sun, 19 May 2024 20:55:48 +0000 (16:55 -0400)]
Return a reference, not a copy.

Stupid mistake from 2009. Thanks to Scott and JMarc for tracking
it down.

(cherry picked from commit de5f63eeb398046027180162272cc83099fdef55)

4 months agoAmend 207eaeee9071cb
Juergen Spitzmueller [Thu, 16 May 2024 05:33:29 +0000 (07:33 +0200)]
Amend 207eaeee9071cb

The upstream encoding needs to be updated after this routine
(see comment in OutputParams.h:183ff.)

(cherry picked from commit 2d95f8fc160d6ecc63acb81ffac16a99339083b2)

4 months agoDocument NeedCProtect -1 InsetLayout option
Juergen Spitzmueller [Wed, 15 May 2024 11:58:28 +0000 (13:58 +0200)]
Document NeedCProtect -1 InsetLayout option

4 months agoAmend a716fb96b53447
Juergen Spitzmueller [Tue, 14 May 2024 11:54:00 +0000 (13:54 +0200)]
Amend a716fb96b53447

(cherry picked from commit af59551b1b0c7d7e95c70ae4db156cba7ac0cefe)

4 months agoNeedCProtect -1 also for InsetLayouts
Juergen Spitzmueller [Tue, 14 May 2024 11:37:29 +0000 (13:37 +0200)]
NeedCProtect -1 also for InsetLayouts

(cherry picked from commit a716fb96b534475759799b195a7edaeb049fbcf6)

4 months agoDocument NeedCProtect -1
Juergen Spitzmueller [Mon, 13 May 2024 04:53:19 +0000 (06:53 +0200)]
Document NeedCProtect -1

(cherry picked from commit ea004cdb28e9b440347a9487d127e55765940c79)

4 months agoAmend 207eaeee9071cb
Juergen Spitzmueller [Sun, 12 May 2024 06:52:09 +0000 (08:52 +0200)]
Amend 207eaeee9071cb

FragileFrame, as opposed to normal frame, supports cprotect (and needs
it in the usual circumstances)

(cherry picked from commit eeb3f9e719d15c4117a510e8a214d1c1b2c5a33c)
(cherry picked from commit 50cd148bd260222e30b6e429d135c45f8c2f1f14)

4 months agoIntroduce NeedCProtect -1 layout option
Juergen Spitzmueller [Sun, 12 May 2024 05:52:16 +0000 (07:52 +0200)]
Introduce NeedCProtect -1 layout option

It turns out beamer frame does not allow \cprotect and errors if it is
used. Hence we need to prevent it in this context entirely.

(cherry picked from commit 207eaeee9071cb828a2ab7f4680f8ff92e379af8)
(cherry picked from commit f05fd787548e8b3082051b7d45bb4119f97a55dc)

4 months agoAmend(1) 5eaa03a1, Adapt to recognise AC_INIT empty buildtype
Kornel Benko [Wed, 15 May 2024 10:16:59 +0000 (12:16 +0200)]
Amend(1) 5eaa03a1, Adapt to recognise AC_INIT empty buildtype

4 months agoCmake build: Adapt to recognise AC_INIT empty buildtype
Kornel Benko [Tue, 14 May 2024 15:07:18 +0000 (17:07 +0200)]
Cmake build: Adapt to recognise AC_INIT empty buildtype

4 months agoUpdate build file
Richard Kimberly Heck [Mon, 13 May 2024 21:39:44 +0000 (17:39 -0400)]
Update build file

4 months ago2.4.0!
Richard Kimberly Heck [Mon, 13 May 2024 21:34:41 +0000 (17:34 -0400)]
2.4.0!

4 months ago Close notes about status of translation
jpc [Mon, 13 May 2024 09:33:56 +0000 (11:33 +0200)]
      Close notes about status of translation

4 months ago Typo
jpc [Mon, 13 May 2024 08:24:29 +0000 (10:24 +0200)]
   Typo

4 months ago Translate documentation of NeedCProtect
jpc [Mon, 13 May 2024 08:16:16 +0000 (10:16 +0200)]
    Translate documentation of NeedCProtect

4 months agoDocument NeedCProtect -1
Juergen Spitzmueller [Mon, 13 May 2024 04:53:19 +0000 (06:53 +0200)]
Document NeedCProtect -1

4 months agoAmend 207eaeee9071cb
Juergen Spitzmueller [Sun, 12 May 2024 06:52:09 +0000 (08:52 +0200)]
Amend 207eaeee9071cb

FragileFrame, as opposed to normal frame, supports cprotect (and needs
it in the usual circumstances)

(cherry picked from commit eeb3f9e719d15c4117a510e8a214d1c1b2c5a33c)

4 months agoIntroduce NeedCProtect -1 layout option
Juergen Spitzmueller [Sun, 12 May 2024 05:52:16 +0000 (07:52 +0200)]
Introduce NeedCProtect -1 layout option

It turns out beamer frame does not allow \cprotect and errors if it is
used. Hence we need to prevent it in this context entirely.

(cherry picked from commit 207eaeee9071cb828a2ab7f4680f8ff92e379af8)

4 months agoStatus
Richard Kimberly Heck [Sat, 11 May 2024 17:03:54 +0000 (13:03 -0400)]
Status

4 months agoConsider CT in dash mechanism (#13062)
Juergen Spitzmueller [Sat, 11 May 2024 11:07:32 +0000 (13:07 +0200)]
Consider CT in dash mechanism (#13062)

(cherry picked from commit fe4f0dbf0b37c413994bbfa780a833b1c041a433)

4 months agoRemerge strings for 2.4.0 release
Richard Kimberly Heck [Fri, 10 May 2024 17:14:09 +0000 (13:14 -0400)]
Remerge strings for 2.4.0 release

4 months agoUpdate LFUNs
Richard Kimberly Heck [Fri, 10 May 2024 17:11:08 +0000 (13:11 -0400)]
Update LFUNs

4 months ago Typo
jpc [Fri, 26 Apr 2024 16:33:33 +0000 (18:33 +0200)]
  Typo

4 months ago Last review of French Tutorial manual before 2.4.0
jpc [Fri, 26 Apr 2024 16:16:22 +0000 (18:16 +0200)]
    Last review of French Tutorial manual before 2.4.0

4 months ago Last review of French Math manual before 2.4.0
jpc [Fri, 26 Apr 2024 09:43:30 +0000 (11:43 +0200)]
   Last review of French Math manual before 2.4.0

4 months ago Last review of French Math manual before 2.4.0
jpc [Fri, 26 Apr 2024 09:42:41 +0000 (11:42 +0200)]
     Last review of French Math manual before 2.4.0

4 months agoSet buffer_ correctly when inseting a math macro over a selection
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 12:28:10 +0000 (14:28 +0200)]
Set buffer_ correctly when inseting a math macro over a selection

The code that handles this special macro insertion (in
Cursor::mathMacroClose())) is very weird: it inserts the contents of
the macro _after_ the macro and later, since the macro is 'greedy', it
will eat this contents and put it in its first macro cell.

Does it make sense to you? It does not ake sense to me either. Anyway,
this is the point where one should make sure that the buffer is set.

Fixes ticket #12682.

(cherry picked from commit b45a957929a78cefc729a0fa984214eb83357d42)

4 months ago Last review of French Intro manual before 2.4.0
jpc [Thu, 25 Apr 2024 16:26:47 +0000 (18:26 +0200)]
            Last review of French Intro manual before 2.4.0

4 months ago Last review of French Customization manual before 2.4.0
jpc [Thu, 25 Apr 2024 16:00:16 +0000 (18:00 +0200)]
  Last review of French Customization manual before 2.4.0

4 months ago Check spelling of the French EmbeddedObjects manual
jpc [Wed, 24 Apr 2024 08:44:06 +0000 (10:44 +0200)]
    Check spelling of the French EmbeddedObjects manual

4 months ago Translation of French Additional manual completed
jpc [Mon, 22 Apr 2024 16:22:01 +0000 (18:22 +0200)]
    Translation of French Additional manual completed

4 months agoSanitize cursors after a buffer has been reloaded
Jean-Marc Lasgouttes [Tue, 16 Apr 2024 09:45:09 +0000 (11:45 +0200)]
Sanitize cursors after a buffer has been reloaded

When a buffer is reloaded, its content may remain the same, but the
memory allocation is new, so that the inset pointers in cursors are
now wrong. This requires to sanitize the cursors held by the buffer
views.

Before the biginset branch, some full metrics computation call that is
now removed probably did that as a side effect. Now we have to be more
precise.

To this effect, introduce WorkAreaManager::sanitizeCursors() and use
it in Buffer::reload().

(cherry picked from commit c1fd622c51752d790576600f5911813ff8dac3fa)

4 months agosmall changes backported from master
Jean-Marc Lasgouttes [Fri, 19 Apr 2024 15:16:00 +0000 (17:16 +0200)]
small changes backported from master

4 months ago Typo
jpc [Mon, 22 Apr 2024 08:27:07 +0000 (10:27 +0200)]
   Typo

4 months ago Remove non supported Article classes in UserGuide
jpc [Mon, 22 Apr 2024 07:18:52 +0000 (09:18 +0200)]
    Remove non supported Article classes in UserGuide

4 months ago* metainfo.xml - homepage missing
Pavel Sanda [Sun, 21 Apr 2024 01:49:12 +0000 (03:49 +0200)]
* metainfo.xml - homepage missing

4 months agoDocument biginset branch
Jean-Marc Lasgouttes [Sun, 21 Apr 2024 20:26:41 +0000 (22:26 +0200)]
Document biginset branch

4 months agoStatus
Richard Kimberly Heck [Sun, 21 Apr 2024 19:56:00 +0000 (15:56 -0400)]
Status

4 months ago Update fr.po
jpc [Sun, 21 Apr 2024 15:19:08 +0000 (17:19 +0200)]
     Update fr.po

4 months agoUpdate sk.po
Kornel Benko [Sun, 21 Apr 2024 10:11:59 +0000 (12:11 +0200)]
Update sk.po

4 months ago* cs.po
Pavel Sanda [Sun, 21 Apr 2024 09:57:29 +0000 (11:57 +0200)]
* cs.po

4 months agode.po
Juergen Spitzmueller [Sun, 21 Apr 2024 09:25:12 +0000 (11:25 +0200)]
de.po

4 months agoremerge strings
Juergen Spitzmueller [Sun, 21 Apr 2024 09:24:02 +0000 (11:24 +0200)]
remerge strings

4 months agoHandle the case of outdated chkconfig.ltx in user directory
Juergen Spitzmueller [Sat, 20 Apr 2024 12:57:12 +0000 (14:57 +0200)]
Handle the case of outdated chkconfig.ltx in user directory

(cherry picked from commit b8ff824a4f4ab4d3e213b55bf8117fd95b7b9657)

4 months agoStatus update
Juergen Spitzmueller [Sun, 21 Apr 2024 07:34:35 +0000 (09:34 +0200)]
Status update

4 months agogbrief-2 loads babel internally. So don't load it ourselves.
Juergen Spitzmueller [Sat, 13 Apr 2024 05:32:30 +0000 (07:32 +0200)]
gbrief-2 loads babel internally. So don't load it ourselves.

This makes the class fully functional with non-TeX fonts (it uses
\babelfont for the purpose). Before, docs were compiling but the
output was wrong.

(cherry picked from commit c3c96a446b32ef77927b5e06436c2668d95dfd6d)

4 months agog-brief loads babel internally. So don't load it ourselves.
Juergen Spitzmueller [Tue, 16 Apr 2024 16:23:01 +0000 (18:23 +0200)]
g-brief loads babel internally. So don't load it ourselves.

This makes the class fully functional with non-TeX fonts (it uses
\babelfont for the purpose). Before, docs were compiling but the
output was wrong.

4 months agoConvert $${python} placeholder for graphic conversions
José Matos [Sun, 14 Apr 2024 20:30:02 +0000 (21:30 +0100)]
Convert $${python} placeholder for graphic conversions

(cherry picked from commit cdcaf0e7b6cc45bc74175667c390c3148c4730e9)

5 months agoCmake install: Forgotten to install tabletemplates.
Kornel Benko [Sat, 20 Apr 2024 17:33:25 +0000 (19:33 +0200)]
Cmake install: Forgotten to install tabletemplates.

(cherry picked from commit d05e295ddc22c65183a203e97240898a055d2d12)

5 months agoCmake install: Forgotten to install tabletemplates.
Kornel Benko [Sat, 20 Apr 2024 17:33:25 +0000 (19:33 +0200)]
Cmake install: Forgotten to install tabletemplates.

(cherry picked from commit d05e295ddc22c65183a203e97240898a055d2d12)

5 months ago French UserGuide: check spelling and remove no more exiting article classes
jpc [Fri, 19 Apr 2024 16:54:01 +0000 (18:54 +0200)]
     French UserGuide: check spelling and remove no more exiting article classes

5 months ago#13049 add window activation for preferences to avoid it be hidden by main window...
Stephan Witt [Fri, 5 Apr 2024 08:47:49 +0000 (10:47 +0200)]
#13049 add window activation for preferences to avoid it be hidden by main window on mac after alert prompts

(cherry picked from commit 4c1db7cad866d99af2f2474d8467cc8581eb0eef)

5 months ago Typos in Additional.lyx, seen while translating in French
jpc [Fri, 19 Apr 2024 09:41:53 +0000 (11:41 +0200)]
   Typos in Additional.lyx, seen while translating in French

5 months ago Typo in fr.po
jpc [Fri, 19 Apr 2024 09:22:45 +0000 (11:22 +0200)]
   Typo in fr.po

5 months ago Typos iun Franch Additional manual
jpc [Fri, 19 Apr 2024 09:21:08 +0000 (11:21 +0200)]
   Typos iun Franch Additional manual

5 months ago Update translation of the French Additional manual, section 4.12 missing
jpc [Fri, 19 Apr 2024 08:54:40 +0000 (10:54 +0200)]
    Update translation of the French Additional manual, section 4.12 missing

5 months ago* another update fo zh_CN.po
Pavel Sanda [Thu, 18 Apr 2024 22:15:38 +0000 (00:15 +0200)]
* another update fo zh_CN.po

5 months agoAlways repaint the gray area below main inset
Jean-Marc Lasgouttes [Tue, 16 Apr 2024 21:55:24 +0000 (23:55 +0200)]
Always repaint the gray area below main inset

Now that SingleParUpdate does not always lead to a full screen update
when the height of the paragraph changes (see new behavior of
updateMatrics(bool)), it is necessary to make sure that the grey area
below the main page is always repainted.

(cherry picked from commit 1a11abe4394272f521cd63993e426c136e0e9b6c)

5 months agoDo not compute metrics at each preview when loading file
Jean-Marc Lasgouttes [Thu, 21 Dec 2023 15:33:06 +0000 (16:33 +0100)]
Do not compute metrics at each preview when loading file

With the branch-test.lyx file from #12297, loading takes forever when
previews are activated. This is because each preview element causes a
full screen metrics recomputation.

This commit just skips these calls and only does one when all previews
have been obtained. As a result, computing the previews takes 1 second
instead of 25 seconds on branch-test.lyx.

Part of bug #12297.

(cherry picked from commit 244969330108a89f4be93d3b2eb9024bdb756204)

5 months agoImprove the code that limits scrolling at top/bottom
Jean-Marc Lasgouttes [Fri, 17 Nov 2023 17:30:37 +0000 (18:30 +0100)]
Improve the code that limits scrolling at top/bottom

The most visible part of this commit is the move of part of
BufferView::updateMetrics to a new TextMetrics::updateMetrics. This
new method makes sure that metrics are known for all visible paragraphs
(starting from anchor), and that the positions of the paragraphs have
been recorded.

This method is called up to 3 times in BufferView::updateMetrics:
* unconditionally, to update all visible metrics,
* then, if the bottom of the document is visible and too high, after
  updating the anchor ypos,
* and similarly if the top of the document is visible and too low.

This fixes for example the case where one jumps to Section 5.3 at the
end of Tutorial and 'scroll_below_document' is false.

Some now redundant code is removed from BufferView::scrollToCursor.

The anchor-setting code in BufferView::draw is not clearly useful, but
left here just in case. It generates a debug warning, though.

Part of bug #12297.

(cherry picked from commit f15d2ebf3819913114ab93d1ff7e140cb26b03d5)

5 months agoImplement quick scroll
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 21:23:40 +0000 (23:23 +0200)]
Implement quick scroll

Replace flag parameter for updateMetrics() by a `force' boolean. When
it is false, the method keeps the metrics of paragraphs that are still
visible in WorkArea instead of computing everything afresh. All it has
to do is update their positions.

Add code to updateMetrics() to update the value of the anchor pit/ypos
(similar to the one in draw()).

Update processUpdateFlags() to use this when update flag is ForceDraw.

Modify scrollDocView() to just change the anchor paragraph position
when the scrolling operation would re-use some of the existing
paragraphs.

The time needed to update the metrics when scrolling with mouse in the
branch-test.lyx document is now divided by 20!

Part of bug #12297.

(cherry picked from commit 08010c6a5e425b3f2d0d625536e3a571c90a0482)

5 months agoIntroduce new helpers ParagraphMetrics::top/bottom
Jean-Marc Lasgouttes [Tue, 25 Jul 2023 14:31:13 +0000 (16:31 +0200)]
Introduce new helpers ParagraphMetrics::top/bottom

This avoids code with position/ascent/descent that is difficult to follow.

No change in function intended.

(cherry picked from commit 0b6105b9245350e428c73deee88af2cd7c0d4732)

5 months agoIn the no-draw phase, do not cache the positions of not visible insets
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 15:53:16 +0000 (17:53 +0200)]
In the no-draw phase, do not cache the positions of not visible insets

This can make a big difference for a very large branch that contains
lots of equations.

This is complementary to the previous patch, since instead of reducing
the number of calls to updatePosCache, we make it faster.

In the same test of scrolling with mouse wheel through the
branch-test.lyx document, one finds a 23% improvement for
BufferView::updateMetrics().

Part of bug #12297.

(cherry picked from commit 7f85024f80601b15634fb5e771bba51435ad429f)

5 months agoRemove some redundant calls to updatePosCache
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 13:35:16 +0000 (15:35 +0200)]
Remove some redundant calls to updatePosCache

The setting of insets positions was done twice in updateMetrics.
When one of the paragraph is a huge branch, this can be very expensive.

This leads to a 17% improvement on updateMetrics time on a scrolling test.

Part of bug #12297

(cherry picked from commit d19ade9a611d3ecf6840c5eb43291cb268ad6f4f)

5 months agoEnable Update::SinglePar in nested insets too
Jean-Marc Lasgouttes [Mon, 17 Jul 2023 12:43:29 +0000 (14:43 +0200)]
Enable Update::SinglePar in nested insets too

The idea of single par update is to try to re-break only the paragraph
containing the cursor (if this paragraph contains insets etc.,
re-breaking will recursively descend).

The existing single paragraph update mechanism was tailored to work
only at top level. Indeed changing a paragraph nested into an inset may
lead to larger changes.

This commit tries a rather naive approach that seems to work well: we
need a full redraw if either

1/ the height has changed
or
2/ the width has changed and it was equal to the text metrics width;
   the goal is to catch the case of a one-row inset that grows with
   its contents, but optimize the case of typing in a short paragraph
   part of a larger inset.

NOTE: if only the height has changed, then it should be
  possible to update all metrics at minimal cost. However,
  since this is risky, we do not try that right now.

Part of bug #12297.

(cherry picked from commit 9a96726bcd06d565c3027011fea954656aa46668)

5 months agoDefer construction of temporary cursor.
Richard Kimberly Heck [Tue, 16 Apr 2024 16:15:50 +0000 (12:15 -0400)]
Defer construction of temporary cursor.

We were doing this on every mouse movement. I.e., for every single
pixel the mouse traverses. It can be expensive if there are a lot
of math insets.

(cherry picked from commit 4e8aa89eb96cd73e6630deea6fd6b9d3039aab6c)