Commit Graph

46459 Commits

Author SHA1 Message Date
Juergen Spitzmueller
fe4f0dbf0b Consider CT in dash mechanism (#13062) 2024-05-11 13:07:32 +02:00
Jean-Marc Lasgouttes
6b3ced7c07 one less place where metrics have to be recomputed 2024-05-09 11:50:18 +02:00
Jean-Marc Lasgouttes
d4f3e87b14 typo 2024-05-09 11:45:55 +02:00
Jean-Marc Lasgouttes
ec9d0a9420 Fixup 527984ed: fix initial screen size when using backing store
When using a back store, it is obviously important to resize it
whenever the buffer view is resized. The new code path added in
527984ed skipped this part, so that the window was wrong when creating
a new window.
2024-05-07 12:01:34 +02:00
Jean-Marc Lasgouttes
9f33db8f53 Fix up 5577e877: remove logic error
Commit 5577e877 introduces forceUpdateBuffer() to delay actual
updatBuffer() calls to a central place.

In Cursor::upDownInText, the updateNeeded flag (which triggers
Update::Force update flag) is set to true when Cursor::checkDepm
returns true. This is fine, except that checkDepm also leads to a
forceBufferUpdate() call.

The logic in the method was such that, when updateNeeded is already
true when entering, forceBufferUpdate() will be called even though
checkDepm did not request it.

Fixes a slight delay with selecting in MergedManual (the manual of
manuals).
2024-05-03 14:38:32 +02:00
Jean-Marc Lasgouttes
f58957747a Fixup 2660df9b99: missing stuff after moving Lexer to support/ 2024-05-01 16:54:10 +02:00
Jean-Marc Lasgouttes
a4d9315bc4 Avoid full metrics computation with Update:FitCursor
The handling of Update::FitCursor traditionnally recomputes all
metrics once or twice. Now that updateMetrics(false) ensures that all
paragraphs that require it have a metrics, we might as well use that.

Take this occasion to move handling of Update::SinglePar earlier,
before the check for Update::ForceDraw.
2024-04-30 15:18:13 +02:00
Jean-Marc Lasgouttes
527984ed2e Fix up 'Reduce metrics updates from 4 to 1 when loading file'
The missing metrics computation meant that, when loading a file, the
workarea would not be scrolled correctly to show the cursor.

The resizeBufferView does not create an additional metrics
computation, it just triggers it earlier.
2024-04-29 18:02:14 +02:00
Scott Kostyshak
23c45f76ad CMake: adapt to new location of Lexer
Lexer is now in support/. See 2660df9b.
2024-04-28 09:13:55 -04:00
Jean-Marc Lasgouttes
df19a70900 Remove unused #include 2024-04-28 12:33:33 +02:00
Jean-Marc Lasgouttes
2660df9b99 Move Lexer to support/ directory (and lyx::support namespace)
This requires quite a bit of trivial code shuffling.
2024-04-28 12:23:13 +02:00
Jean-Marc Lasgouttes
ed2f3cb9cf 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.
2024-04-25 17:22:22 +02:00
Jean-Marc Lasgouttes
b45a957929 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.
2024-04-25 14:32:18 +02:00
Jean-Marc Lasgouttes
af3521881c typo 2024-04-25 14:27:22 +02:00
Jean-Marc Lasgouttes
623cc13b60 Autotools: optimize with -Og when debugging
When debug (-g) is enabled (default when compiling a development
version), the existing -O optimization level is not correct, since
many variables are optimized out when debugging.

Use -Og instead, and condition not on compiling a development version,
but on --enable-debug. This is the same by default, but it more
precise in our case.
2024-04-25 12:30:48 +02:00
Jean-Marc Lasgouttes
c013799887 Force a Buffer * argument to math insets constructor
Make sure that math insets have a proper buffer. To this end, make the
Buffer* parameter of InsetMath mandatory and fix the compilation
errors that ensue.
2024-04-24 16:27:04 +02:00
Jean-Marc Lasgouttes
57d7130655 Force a Buffer * argument to MathData constructor
In order to ensure that MathData objects have a valid buffer, the
default MathData() constructor is deleted. This means that a buffer
shall be specified for each MathData object created.

This is fairly mechanical, actually. In particular, in most
InsetMathXxx cases, in MathData and in MathParser, the available
buffer_ member is used.

More specific cases:
- lyxfind.cpp takes the buffer from the Cursor

- calls to vector<MathData>::resize take an additional
  MathData(buffer_) parameter. There are cases where resize actually
  remove cells, and in this case clear() or even erase() have been
  used.

- in InsetMathMacroTemplate, the optional parameters of the
  constructors cannot be allowed anymore (a default value cannot
  depend on another parameter). Therefore there a now two constructors
  instead.

- in MathAutoCorrect.cpp, the MathData objects are not bound to a
  buffer, so that std::nullptr is used instead.

- in MathExtern, use a buffer when one is specified, std::nulptr
  instead.
2024-04-24 16:26:57 +02:00
Jean-Marc Lasgouttes
f3c5ff9cb7 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.
2024-04-22 17:52:23 +02:00
Pavel Sanda
358efd120a * metainfo.xml - homepage missing 2024-04-21 03:49:12 +02:00
Scott Kostyshak
dd4c67bfdc Whitespace 2024-04-20 14:22:07 -04:00
Kornel Benko
ba880319e8 Update sk.po 2024-04-20 20:06:27 +02:00
Kornel Benko
d05e295ddc Cmake install: Forgotten to install tabletemplates. 2024-04-20 19:33:25 +02:00
Juergen Spitzmueller
1a7df1ab69 de.po 2024-04-20 17:06:00 +02:00
Juergen Spitzmueller
d64c9a9d00 de.po 2024-04-20 16:59:17 +02:00
Juergen Spitzmueller
b8ff824a4f Handle the case of outdated chkconfig.ltx in user directory 2024-04-20 14:57:12 +02:00
Pavel Sanda
c8b32ebe72 *UG - Add hint from users list 2024-04-20 00:24:44 +02:00
Jean-Marc Lasgouttes
eacb9ebf42 Small change 2024-04-19 18:21:26 +02:00
Jeân-Marc Lâsgöuttes
e631f908a7 Small change 2024-04-19 17:51:29 +02:00
Jean-Marc Lasgouttes
abc8d49acd small change 2024-04-19 17:24:10 +02:00
Jean-Marc Lasgouttes
1b50e72570 small change 2024-04-19 17:16:00 +02:00
Richard Kimberly Heck
c395eda347 Set Buffer for MathData when creating macro view 2024-04-18 18:25:47 -04:00
Richard Kimberly Heck
7c140f743d Little bit more debug info for unset Buffer members. 2024-04-18 18:25:47 -04:00
Pavel Sanda
9bd5d0b251 * zh_CN.po (update from 2.4.x) 2024-04-19 00:20:02 +02:00
Jean-Marc Lasgouttes
1a11abe439 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.
2024-04-17 23:12:09 +02:00
Jean-Marc Lasgouttes
c1fd622c51 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().
2024-04-16 23:48:01 +02:00
Juergen Spitzmueller
2f6b24297f 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.
2024-04-16 18:25:38 +02:00
Richard Kimberly Heck
4e8aa89eb9 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.
2024-04-16 12:15:50 -04:00
José Matos
cdcaf0e7b6 Convert $${python} placeholder for graphic conversions 2024-04-14 21:30:02 +01:00
Juergen Spitzmueller
09c72d7c8d Set cursor font after pasting to PassThru inset (#12592) 2024-04-13 11:36:10 +02:00
Juergen Spitzmueller
cab03f2680 Fix indentation 2024-04-13 10:11:24 +02:00
Juergen Spitzmueller
5477451e36 Disable language package choice if the class preloads a package 2024-04-13 10:07:18 +02:00
Juergen Spitzmueller
c3c96a446b 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.
2024-04-13 07:32:30 +02:00
Koji Yokota
b07a263c18 Fix wrong position of conversion windows of the input method #11723, #13054 2024-04-12 21:22:31 +09:00
Stephan Witt
cad4da738d #12641 document the Qt fix in release notes 2024-04-11 23:26:26 +02:00
Stephan Witt
2883cd4215 Add LyX-2.4 user directory to the list of candidates for copying on first run of LyX-2.5. 2024-04-11 18:32:03 +02:00
Stephan Witt
945a02e2e1 Improved copy operation for user directory contents of previous major releases
- avoid copying of configure.log
- avoid copying of chkconfig.ltx
  There is a report of a hang on first start of LyX with new major release.
  The removal of the chkconfig.ltx (leftover from early LyX versions) fixed the issue.
2024-04-11 18:32:03 +02:00
Pavel Sanda
511f895c98 Update credits 2024-04-11 09:42:29 +02:00
Pavel Sanda
e678745495 * zh_CN.po - update credits 2024-04-11 09:37:36 +02:00
Jiaxu Zi
3030bc6452 update zh_CN translation 2024-04-11 09:35:57 +02:00
Pavel Sanda
26ba2a6583 Update Win installer for new dictionary links. Untested. 2024-04-10 21:13:41 +02:00