]>
git.lyx.org Git - lyx.git/log
Richard Heck [Mon, 2 Apr 2018 02:18:04 +0000 (22:18 -0400)]
Fix bug 11099.
Adds simple search/find functionality to preamble.
Juergen Spitzmueller [Sun, 18 Mar 2018 17:30:48 +0000 (18:30 +0100)]
Open ExternalInset dialog on first tab for new insets
Fixes: #11081
(cherry picked from commit
126e0c3dac5a6b223d609a7bfa29295f19992987 )
Juergen Spitzmueller [Thu, 22 Feb 2018 10:24:43 +0000 (11:24 +0100)]
Handle comments in options
Things like
pdfpagemode=UseOutlines%None,UseOutlines,UseThumbs,FullScreen
was not imported correctly (the comment was not stripped)
Fixes the rest of #5737
(cherry picked from commit
820ec38da7ce04ec95b1a8e1e2d1aa9b7d0762fb )
Richard Kimberly Heck [Wed, 28 Mar 2018 19:46:39 +0000 (15:46 -0400)]
Whitespace only.
Juergen Spitzmueller [Mon, 26 Mar 2018 16:35:09 +0000 (18:35 +0200)]
typo
Juergen Spitzmueller [Mon, 26 Mar 2018 13:50:35 +0000 (15:50 +0200)]
Fix use of default biblio_style
Fixes: #11088
Jean-Marc Lasgouttes [Tue, 30 Jan 2018 13:32:53 +0000 (14:32 +0100)]
Make it possible to select (not)native file dialogs at run time
Add a new LyXRC variable use_native_filedialog (true by default) that
allows to select the kind of FileDialog we want at runtime.
(cherry picked from commit
af795b80d8512926261e2457bc5f2e0ac017bec4 )
Juergen Spitzmueller [Fri, 13 Oct 2017 09:25:55 +0000 (11:25 +0200)]
Some improvements to the graphics dialog
* Describe the viewport/bb situation more accurate
* Use generic term "coordinates", since bb and viewport are flavor-specific
* Add some tooltips
* Increase the width of the options widget.
(cherry picked from commit
c462fadff57373744e27ac38df04bac2c651b67c )
Juergen Spitzmueller [Sun, 18 Mar 2018 11:11:26 +0000 (12:11 +0100)]
Properly fix math packages table in Document Settings
Fixes: #10777
(cherry picked from commit
3face5e119e27bf297bbaf647e8941bc6babd0c3 )
Uwe Stöhr [Sun, 5 Nov 2017 12:39:09 +0000 (13:39 +0100)]
GuiDocument.cpp: change back alignment for column with package names
- as discussed in bug #10777 the first column should be left-aligned
(cherry picked from commit
56670d73224e3bc2b80943b789fa2364d00a552d )
Uwe Stöhr [Thu, 2 Nov 2017 21:25:26 +0000 (22:25 +0100)]
GuiDocument.cpp: fix bug 10777
- the column width must be as wide as the column header text
- also center the radiobuttons in the table
- also use alternating colors for the table rows
(cherry picked from commit
a69f1a9e161c87cc58e1a2dcec1e174136190b89 )
Juergen Spitzmueller [Sat, 17 Mar 2018 15:44:09 +0000 (16:44 +0100)]
tex2lyx: complete minted support (inputminted)
Also fix some whitespace issues in minted inset import.
(cherry picked from commit
f3c5bcd2be4edc37dec4c78422f31e07b322b298 )
Juergen Spitzmueller [Sat, 10 Mar 2018 14:40:51 +0000 (15:40 +0100)]
tex2lyx: add support for lstinputlisting
(cherry picked from commit
d325f79f5c782edcfa32e87579fb102763d8d29b )
Juergen Spitzmueller [Sat, 17 Mar 2018 13:36:56 +0000 (14:36 +0100)]
Update status
Juergen Spitzmueller [Sat, 17 Mar 2018 12:20:48 +0000 (13:20 +0100)]
tex2lyx: add beamer test file
(cherry picked from commit
63b67fee8329840f0fbbd75b8ec9321ba1243555 )
Juergen Spitzmueller [Sat, 17 Mar 2018 11:19:50 +0000 (12:19 +0100)]
tex2lyx: do not eat empty paragraphs if keepempty is true
Fixes: #11078
(cherry picked from commit
79728dcde975fc5968d0ef9e6b56df57023acd88 )
Juergen Spitzmueller [Sat, 17 Mar 2018 11:39:13 +0000 (12:39 +0100)]
tex2lyx: handle makebeamertitle
(cherry picked from commit
d93076c1284de96b12cb583edfee2654de928a61 )
Juergen Spitzmueller [Sat, 17 Mar 2018 11:38:53 +0000 (12:38 +0100)]
tex2lyx: clear latexparam after use.
(cherry picked from commit
7e3a41bd15e993bf738134c6dc601f482d036894 )
Juergen Spitzmueller [Fri, 16 Mar 2018 11:56:17 +0000 (12:56 +0100)]
tex2lyx: add support for LaTeXParam
Part of #11068
(cherry picked from commit
506ae2d2ea1e646461841c57edd3f79c97d671c2 )
Juergen Spitzmueller [Wed, 14 Mar 2018 13:38:18 +0000 (14:38 +0100)]
tex2lyx: support for beamer text styles with overlays
E.g. things like \textbf<article>{foo} have to be imported as insets.
Part of #11068
(cherry picked from commit
c74e3999812dfdff3cb6d20ef460dfca1f17c879 )
Juergen Spitzmueller [Wed, 14 Mar 2018 07:40:47 +0000 (08:40 +0100)]
tex2lyx: More work on beamer support
* Implement list item overlay support (\item<arg>)
* Implement itemcommand support (e.g., \overprint<arg>)
* Fix general list argument placement
Part of: #11068
(cherry picked from commit
e51265b5f3c7765ad185303ac147792c7599386f )
Juergen Spitzmueller [Mon, 12 Mar 2018 13:50:19 +0000 (14:50 +0100)]
tex2lyx: towards beamer overlay argument support.
Implemented: Overlay and standard overlay arguments for commands
and environments.
Still missing:
* List item overlay
* itemcommand overlay (\overprint)
* overlay via LatexParam (e.g., Flex:ArticleMode)
Needs fixing:
* General list argument (\begin{itemize}[arg])
* nested content in a frame with no title (empty par)
(cherry picked from commit
949de66956309ea787b86d69a00b72d154b4d4db )
Pavel Sanda [Mon, 12 Mar 2018 12:40:52 +0000 (13:40 +0100)]
Paint \dot & \ddot more like a dot
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg204183.html
Juergen Spitzmueller [Tue, 13 Mar 2018 16:39:40 +0000 (17:39 +0100)]
Fix known_escaped_chars
(this includes the amend)
Juergen Spitzmueller [Mon, 12 Mar 2018 08:35:39 +0000 (09:35 +0100)]
update tex2lyx tests
Juergen Spitzmueller [Sun, 11 Mar 2018 17:04:23 +0000 (18:04 +0100)]
tex2lyx: update quote handling
* Consider new quote styles
* Consider changed quote styles
* Try to be a bit smarter with ambiguous quotation marks
(cherry picked from commit
8184f08f4af6efea6d1499e3f8c8d3c20ebb1b97 )
Juergen Spitzmueller [Sun, 11 Mar 2018 10:46:37 +0000 (11:46 +0100)]
tex2lyx: support tipa \t*{} macro.
(cherry picked from commit
cc6f2dae8219b40cd8602f70110926296403a0f7 )
Juergen Spitzmueller [Sun, 11 Mar 2018 18:56:04 +0000 (19:56 +0100)]
update tex2lyx tests once more.
Juergen Spitzmueller [Sun, 11 Mar 2018 18:49:28 +0000 (19:49 +0100)]
Juergen Spitzmueller [Sun, 11 Mar 2018 18:31:19 +0000 (19:31 +0100)]
update tex2lyx tests.
Juergen Spitzmueller [Sun, 11 Mar 2018 17:33:45 +0000 (18:33 +0100)]
Status updates.
Juergen Spitzmueller [Sat, 10 Mar 2018 13:58:55 +0000 (14:58 +0100)]
tex2lyx: make nested CJK parsing slightly less dumb.
Fixes: #9562
(cherry picked from commit
0f4c9027056a6f4f771382e9ebfc7940274bf5c0 )
Juergen Spitzmueller [Fri, 9 Mar 2018 12:14:13 +0000 (13:14 +0100)]
tex2lyx: honor grouping in optional arguments.
E.g., \cite[{a literal ] character}]{key}
(cherry picked from commit
cba38881d6b9fa3ff5dd0ebe50239fc384309082 )
Juergen Spitzmueller [Fri, 9 Mar 2018 11:29:07 +0000 (12:29 +0100)]
Fix copy and paste error in
6659304f7f8b
(cherry picked from commit
0513622fd0ce600cbf283f6afdbde9841d46a546 )
Juergen Spitzmueller [Thu, 8 Mar 2018 14:00:33 +0000 (15:00 +0100)]
tex2lyx: towards proper support of "literal"/"latexified" inset commands
We now report whether the attempt to recode the macros to glyphs
succeeded. If yes, we set "literate" to false, if not to true.
Also, do not attempt to recode for non-latexifying fields.
Fixes: #9563
(cherry picked from commit
6659304f7f8b57f12a1bf453a11ea359c83a7d14 )
Juergen Spitzmueller [Sun, 11 Mar 2018 10:12:42 +0000 (11:12 +0100)]
tex2lyx: support for URW Classico, MinionPro and the new Libertine fonts.
(cherry picked from commit
a3836d990926dfd8e7e35b266274c372c72206ce )
Juergen Spitzmueller [Sat, 10 Mar 2018 14:00:30 +0000 (15:00 +0100)]
tex2lyx: get rid of another large if-else if chain.
(cherry picked from commit
11e4a24e6edbd1f69b60a194b31ac2d7c4dd5034 )
Juergen Spitzmueller [Sat, 10 Mar 2018 13:22:51 +0000 (14:22 +0100)]
Juergen Spitzmueller [Fri, 9 Mar 2018 16:27:55 +0000 (17:27 +0100)]
tex2lyx: support for \includeonly
(cherry picked from commit
15fd17d83fb2b98d1ff226a79353e42f6e0247d4 )
Juergen Spitzmueller [Fri, 9 Mar 2018 12:30:52 +0000 (13:30 +0100)]
tex2lyx: chapterbib support
(cherry picked from commit
af6933c06f603beca3d8684f56217243cbff1f94 )
Uwe Stöhr [Tue, 6 Mar 2018 21:34:21 +0000 (22:34 +0100)]
status.23x: correct sorting
tex2lyx biblatex support is an improvement not a bugfix. At least in the past we sorted new tex2lyx features this way.
Juergen Spitzmueller [Tue, 6 Mar 2018 16:54:32 +0000 (17:54 +0100)]
tex2lyx: support alignment pseudo-environments.
Fixes: #7857
(cherry picked from commit
7a22ce7c09f54ca70f30dde05c3f77c478195e45 )
Juergen Spitzmueller [Tue, 6 Mar 2018 14:31:43 +0000 (15:31 +0100)]
Fix local polyglossia switch for Arabic
We need to lowercase the language again (it's \begin{Arabic},
but \textarabic)
Fixes: #11057.
(cherry picked from commit
27584f5f7033f6abe127e66b4f5114663e043157 )
Juergen Spitzmueller [Tue, 6 Mar 2018 09:35:55 +0000 (10:35 +0100)]
tex2lyx: fix subfloat import
Fixes: #10385
(cherry picked from commit
1dcb2a09766335aecbe3c8599d09358e135d699c )
Juergen Spitzmueller [Tue, 6 Mar 2018 16:31:19 +0000 (17:31 +0100)]
Remove duplicate entries.
Uwe Stöhr [Tue, 6 Mar 2018 12:52:42 +0000 (13:52 +0100)]
status.23x: mention the new biblatex support in tex2lyx
Uwe Stöhr [Mon, 5 Mar 2018 16:37:50 +0000 (17:37 +0100)]
tex2lyx/text.cpp: fix a typo
(cherry picked from commit
a30972a39c10647ffcb7eab5382f250331db7a8b )
Juergen Spitzmueller [Mon, 5 Mar 2018 13:57:16 +0000 (14:57 +0100)]
Small update of TODO
(cherry picked from commit
4bc379ea67ea632ac13c12abd639f6b3f6b25a45 )
Juergen Spitzmueller [Mon, 5 Mar 2018 08:08:14 +0000 (09:08 +0100)]
parse_text (tex2lyx): get rid of the monstrous if-then-else clause
Rather than that, continue in the loop if a condition is met.
This fixes tex2lyx for MINGW, which has a cluase-nesting threshold.
Fixes: #9552
(cherry picked from commit
b94bb37e5310b9007ed812c58460a5292820c534 )
Juergen Spitzmueller [Sun, 4 Mar 2018 19:12:27 +0000 (20:12 +0100)]
tex2lyx: support qualified citation lists (biblatex)
(cherry picked from commit
0915e814814ab26732b6dd13fc1740cfbf64b5b4 )
Juergen Spitzmueller [Sun, 4 Mar 2018 16:29:59 +0000 (17:29 +0100)]
tex2lyx: refsection and bibbysection support (biblatex)
(cherry picked from commit
1a3dbbf07ad837a685af93bf3d1d1a784e0d27ae )
Juergen Spitzmueller [Sun, 4 Mar 2018 15:46:31 +0000 (16:46 +0100)]
tex2lyx: support biblatex
(qualified citation lists and multibib not yet supported)
(cherry picked from commit
f22213a04fe53dd128f11db9b228623b3fc3dda7 )
Juergen Spitzmueller [Sun, 4 Mar 2018 15:45:37 +0000 (16:45 +0100)]
tex2lyx: consider options passed via \PassOptionsToPackage
(cherry picked from commit
476401a76f8bdb3dd2c2a482b2088f00dbe501d9 )
Juergen Spitzmueller [Sun, 4 Mar 2018 11:08:08 +0000 (12:08 +0100)]
tex2lyx: import straight quotation marks as ERT
This assures that they are output as straight quotations marks (e.g.,
babel shorthands).
Fixes: #75 [sic!]
(cherry picked from commit
ccb9ae96709ea32cf983d6e5fb5d655b28a817e1 )
Pavel Sanda [Fri, 2 Mar 2018 19:48:08 +0000 (20:48 +0100)]
Allow reload if buffer is externally modified.
Follow-up of
2df82c4a44b7 .
Pavel Sanda [Thu, 1 Mar 2018 23:49:15 +0000 (00:49 +0100)]
Filter in citation dialog is not respected when reloading databaze.
Juergen Spitzmueller [Mon, 26 Feb 2018 16:06:31 +0000 (17:06 +0100)]
No manual intervention needed for polyglossia (bidi) and RTL numbers.
See https://tex.stackexchange.com/a/256837/19291
(cherry picked from commit
00d4144352ffecfb229fcaaf104a2103002235bc )
Juergen Spitzmueller [Sun, 25 Feb 2018 16:19:42 +0000 (17:19 +0100)]
Take actual font height (ascent, descent) into account when drawing placeholder box for graphics
Fixes: #11048
(cherry picked from commit
5ddd377a0ae6c8c18f566463988e3e3f596e57bb )
Pavel Sanda [Sun, 25 Feb 2018 13:49:21 +0000 (14:49 +0100)]
We don't want external change to automatically marked the buffer dirty.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203995.html
Jean-Marc Lasgouttes [Thu, 22 Feb 2018 16:00:54 +0000 (17:00 +0100)]
Improve documentation of inset-(begin|end)(|-select)
Make it clear that it can go at the beginning/end of the document.
(cherry picked from commit
f4693ef8ab68c978c42bb987634eabcad92d592d )
Richard Heck [Thu, 22 Feb 2018 20:40:05 +0000 (15:40 -0500)]
Fix bug #10817.
Respect 'literal' setting when calculating longest bibitem.
(cherry picked from commit
224e56c935074729b39aa59994d3e42031f6db17 )
Richard Heck [Thu, 22 Feb 2018 20:24:28 +0000 (15:24 -0500)]
Respect "literal" setting when entering citation via LyX server.
This requires moving the bool that tracks this somewhere that it
is visible from BufferView. It seemed to make sense to put it as
a static member of InsetCitation.
(cherry picked from commit
f8e8877f839dcd0d133e6982d107b7d167c524c3 )
Juergen Spitzmueller [Wed, 21 Feb 2018 15:37:07 +0000 (16:37 +0100)]
Implement IsTocCaption for normal layouts.
But use default "true" to maintain current behavior if not explicitly
stated otherwise.
Fixes: #11045
(cherry picked from commit
8a703573ea9718a06c94522e40671d46f0b83522 )
Jean-Marc Lasgouttes [Wed, 21 Feb 2018 11:05:40 +0000 (12:05 +0100)]
Add Alex Dunlap to our contributors
(cherry picked from commit
4447fb349cbbc18f0aaebd9010fb320700d58c79 )
(cherry picked from commit
6d582e5e50e5ccc91bfb0565fef51ccff995481c )
Alexander Dunlap [Thu, 15 Feb 2018 19:28:34 +0000 (11:28 -0800)]
save session when we save a buffer
Implements enhancement #10712.
(cherry picked from commit
cca365f26c7d541cc13453fc42fc9b6de7736319 )
Jean-Marc Lasgouttes [Mon, 12 Feb 2018 16:11:09 +0000 (17:11 +0100)]
Use parMetrics to access the par_metrics_ map
In cursorY, it is dangerous to access par_petrics_[0], since one does
not know whether metrics have been computed for this paragraph (which
may be off-screen).
It is safer to use parMetrics(0), that will compute the paragraph
metrics as needed.
Fixes bug #8120.
(cherry picked from commit
a25b48f86cdde98bbd5f8ece06c6bf2f12ee84db )
Pavel Sanda [Sat, 17 Feb 2018 18:07:02 +0000 (19:07 +0100)]
* layouttranslations reviewed by Inaki
Pavel Sanda [Sat, 17 Feb 2018 18:01:53 +0000 (19:01 +0100)]
* eu.po - update from Inaki.
Juergen Spitzmueller [Fri, 16 Feb 2018 17:19:05 +0000 (18:19 +0100)]
update status
Juergen Spitzmueller [Fri, 16 Feb 2018 16:47:14 +0000 (17:47 +0100)]
Revove unused variable
Juergen Spitzmueller [Wed, 27 Dec 2017 10:49:54 +0000 (11:49 +0100)]
Open intitle command explicitly also for passthru.
(cherry picked from commit
87960e3dd892cd7c60925efd44d40f593ac7883e )
Juergen Spitzmueller [Tue, 26 Dec 2017 12:11:00 +0000 (13:11 +0100)]
Use TeXOnePar for the inpreamble layouts
This considers paragraph language and spacing (and simplifies the code)
(cherry picked from commit
a2f886d52617815e8c80f12ef66198307d3432d6 )
Juergen Spitzmueller [Tue, 26 Dec 2017 10:40:58 +0000 (11:40 +0100)]
Fix inpreamble styles.
(cherry picked from commit
e55e9c842f25b4425db362cd5cb487187f34ba2b )
Juergen Spitzmueller [Sat, 23 Dec 2017 12:25:13 +0000 (13:25 +0100)]
Fix switch of language and line spacing in InTitle commands.
Fixes: #9332, #10849
(cherry picked from commit
49e3f8e830a7c8a15f4d9f73e4dab78e93b24bf7 )
Juergen Spitzmueller [Wed, 6 Dec 2017 08:11:18 +0000 (09:11 +0100)]
Recreate citation label after paste
Fixes: #10829
(cherry picked from commit
7e34e659431691fd723e408010f90973c0a25b39 )
Pavel Sanda [Thu, 15 Feb 2018 21:41:43 +0000 (22:41 +0100)]
* UserGuide - add sentence about graphic groups unification.
Pavel Sanda [Thu, 15 Feb 2018 20:48:47 +0000 (21:48 +0100)]
* status file
Pavel Sanda [Thu, 15 Feb 2018 20:48:23 +0000 (21:48 +0100)]
Oops, asInsetGrpahics is new to master.
Pavel Sanda [Fri, 9 Feb 2018 22:46:14 +0000 (23:46 +0100)]
Cosmetics per JMarc's suggestions.
Pavel Sanda [Thu, 8 Feb 2018 20:33:37 +0000 (21:33 +0100)]
Unify graphics-groups inside marked block functionality.
Fixes #11026.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203683.html
Jean-Marc Lasgouttes [Thu, 15 Feb 2018 13:08:16 +0000 (14:08 +0100)]
Merge remote-tracking branch 'features/properpaint' into 2.3.2-staging
This makes sure that painting actually happens at paint events, making
display more fluid.
Jean-Marc Lasgouttes [Mon, 8 Jan 2018 10:49:40 +0000 (11:49 +0100)]
Fix ghost caret
This fixes a regression in
e64ea357 , where a test has been (badly)
tightened to avoid that two consecutive rows may be redrawn to get rid
of caret ghosts. The test prohibited empty rows from being redrawn.
Moreover, improve the test of cursor boundary to avoid the case where
cursor position is already 0.
Fixes bug #10952.
(cherry picked from commit
66c677b9463feb0687a8228603f86eddd4e859fd )
Jean-Marc Lasgouttes [Sat, 6 Jan 2018 19:46:06 +0000 (20:46 +0100)]
Fix compilation in monolithic mode
(cherry picked from commit
3aa10c8dbaf4813fb30d6e9487a5d50720c7affd )
Jean-Marc Lasgouttes [Sat, 25 Nov 2017 11:31:11 +0000 (12:31 +0100)]
Use a backing store on macOS
Qt on macOS does not respect the Qt::WA_OpaquePaintEvent attribute and
clears the widget backing store at each update. Therefore, we use our
own backing store in this case.
This restores a simplified version of the code that was removed at
06253dfe .
(cherry picked from commit
2316435f2fd2da28c70e1b251b852d3bf6d8011a )
Jean-Marc Lasgouttes [Wed, 29 Nov 2017 10:16:09 +0000 (11:16 +0100)]
Make sure that rows are repainted when they get (un)selected
The bug is the following: when selecting several paragraphs quickly
enough, some rows do not get selected.This is a consequence of the
removal of row crc, which lead to not taking into account the
selection status of the row in the decision to repaint.
The solution chosen here is to add a Row::change() helper function to
modify row members. This will set the Row changed status whenever the
value of the member changes.
(cherry picked from commit
ae60749f89fb4ee0fca05ac75979d434f6b0401d )
Jean-Marc Lasgouttes [Fri, 24 Nov 2017 22:36:28 +0000 (23:36 +0100)]
Fixup
ac4bcb12
Cursor at end of paragraph should be treated as if boundary was on.
(cherry picked from commit
d01dd54bf14167e880c1d0a6382b87e622c2c2ed )
Jean-Marc Lasgouttes [Thu, 23 Nov 2017 14:38:17 +0000 (15:38 +0100)]
Avoid some caret ghosts
When the caret is at end of row, if may happen that it is drawn after
the end of the row. In this case caret blinking will not work
properly. This patch extends the row background on the left and right
by Inset::TEXT_TO_INSET_OFFSET. This is only a hack that will not work
if the caret has a ridiculous width like 6.
Additionally, introduce some (disabled) debug code that numbers the
rows on screen by painting order.
Finally, make the code that detects whether the caret was in a given
row more precise (take boundary into account).
Fixes (mostly, see above) bug #10797.
(cherry picked from commit
e64ea3576c4534fc647a74d1c9f5e67db39ef783 )
Jean-Marc Lasgouttes [Sat, 11 Nov 2017 11:40:39 +0000 (12:40 +0100)]
Remove row crc computation
This computation did not make sense anymore since we began to put the
contents in the Row object. The fact that it worked was a coincidence.
Instead, we set rows as changed() on creation and reset that once they
have been drawn. This will allow in the future for a finer definition
of what to redraw or not.
Also update the PAINTING_ANALYSIS document
(cherry picked from commit
9e2da4a3eac83f46ab184ea8d674f84643814017 )
Jean-Marc Lasgouttes [Sat, 11 Nov 2017 10:57:39 +0000 (11:57 +0100)]
Store change bar information in row element
It is wrong to compute this at paint time. In general, painting a row
should not require any access to a paragraph object, but we are far
from there now.
(cherry picked from commit
4858bb3bb68aac142815b530a017e3776d1c7c11 )
Jean-Marc Lasgouttes [Wed, 11 Oct 2017 16:00:48 +0000 (18:00 +0200)]
Allow multiple calls to processUpdateFlags before redraw
The goal of this commit is to ensure that a processUpdateFlags call
that requires no redraw will not override a previous one that did
require a redraw.
To this end, the semantics of the flag argument is now different: its
value is now OR'ed with a private update_flags_ variable. This
variable is only reset after the buffer view has actually been
redrawn.
A new Update::ForceRedraw flag has been added. It requires a full
redraw but no metrics computation. It is not used in the main code
(yet), but avoids to compute metrics repeatedly in consecutive
processUpdateFlags calls.
The process is now as follows:
- if flags is just None, return immediately, there is nothing to do.
- the Force flag is honored (full metrics computation) and replaced
with ForceDraw.
- the FitCursor flag is honored and removed from the flags.
- the SinglePar update is added if ForceDraw is not in flags and only
the current par has been modified.
The remaining flags are only then added to the BufferView update
flags, and the update strategy is computed for the next paint event.
Finally the dubious call to updateMacros in updateMetrics has been
removed for performance reasons.
(cherry picked from commit
8d8988de475bf2055f253823e53fd5627be5de78 )
Jean-Marc Lasgouttes [Mon, 2 Oct 2017 15:07:31 +0000 (17:07 +0200)]
Create new method GuiWorkArea::Private:::updateCaretGeometry
This replaces a showCaret/hideCaret pair and avoids an update.
Also remove an update() call in resizeBufferView: is is not necessary
since we are already in a pintEvent handler.
(cherry picked from commit
add342d088c1b65343234576a35e567507fb2d49 )
Jean-Marc Lasgouttes [Fri, 29 Sep 2017 08:29:39 +0000 (10:29 +0200)]
Improve the logic of caret repainting
For some reason the existing code only considered the bottom row that
contained the cursor. There is no need for that, and actually it
caused painting problems in nested insets.
Tweak the logic of repaint_caret_row_ a bit: there is no need for
repainting when there is currently no caret on screen.
(cherry picked from commit
764a153c69bb9b46a6e6872ce48e06f5f867cc53 )
Jean-Marc Lasgouttes [Wed, 27 Sep 2017 15:52:06 +0000 (17:52 +0200)]
Fix bad refresh when changing zoom level
Replace the tricky code in LFUN_SCREEN_FONT_UPDATE and replace it with
proper use of DispatchResult flags.
LFUN_BUFFER_ZOOM* does not need to call LFUN_SCREEN_FONT_UPDATE, since
it already does everything that is required.
(cherry picked from commit
9df59aac63bbb56d9d5f5ddcccfaa3ebace2f03d )
Jean-Marc Lasgouttes [Mon, 18 Sep 2017 09:21:18 +0000 (11:21 +0200)]
Do not presume what the defaults for a new QPainter are
(cherry picked from commit
275d306c73e3e0f60e0742adbcb06cce98c48ee5 )
Jean-Marc Lasgouttes [Mon, 18 Sep 2017 08:58:07 +0000 (10:58 +0200)]
Remember correctly pixel ratio used for painting
This avoids endless resize issues on HiDPI systems (e.g. Retina Mac).
Rename pixel_ratio_ to last_pixel_ratio_ to emphasize that this is a
cached value.
Inline needResize method to make the logic clearer in paintEvent.
(cherry picked from commit
6532e5104dfad5416817d89a5f91e53c30cdd523 )
Jean-Marc Lasgouttes [Thu, 14 Sep 2017 13:50:30 +0000 (15:50 +0200)]
Compute metrics when graphics is updated
Remove the old schedule_redraw_ mechanism that was only useful because
of our synchronous drawing code. Now that actual painting is
scheduled instead of forced, it becomes pointless.
Rename WorkArea::redraw(bool) to scheduleRedraw(bool), to show that
the drawing is not done right away.
In GuiView::updateInset, call scheduleRedraw(true), so that metrics
are correctly computed (this was the whole point of the exercise).
(cherry picked from commit
a31d3dc67dce9655bee9f1b0a2bc2188d7d97453 )
Jean-Marc Lasgouttes [Wed, 30 Aug 2017 16:05:16 +0000 (18:05 +0200)]
Update insets position in cache in more cases
This patch makes sure that, every time a ParagraphMetrics has its
position set, the inset positions for the insets held by this
paragraph are remembered too.
This is complementary to BufferView::updatePosCache, but I do not have
hard evidence that this is required other than to increase robustness.
It may help in some cases when scrolling the document (scrollbar,
cursor up/down, page up/down).
Jean-Marc Lasgouttes [Thu, 24 Aug 2017 15:37:56 +0000 (17:37 +0200)]
Rename more instances of "cursor" to "caret"
Thanks to Pavel for the hint.
Jean-Marc Lasgouttes [Sun, 23 Jul 2017 13:50:35 +0000 (15:50 +0200)]
Remove workaround that is not necessary anymore.
This code was necessary to handle cases where the insets positions
were not yet in cache. This cannot happen anymore thanks to the
nodraw stage.
Jean-Marc Lasgouttes [Sun, 23 Jul 2017 10:39:26 +0000 (12:39 +0200)]
Update the painting process documentation