Scott Kostyshak
f1accdebf3
Refresh previews on branch toggle
...
We only referesh previews if the branch that is toggled exists in a
descendant. This code could be further optimized, as noted in the
comments.
For relevant discussion, see the following ML thread:
https://www.mail-archive.com/search?l=mid&q=20191209022030.d6gyy3abdectr3yz%40tallinn
2019-12-11 11:48:56 -05:00
Scott Kostyshak
c61472303e
Fix crash due to encoding issues with child doc
...
This crash occurred starting with 553bebc3
, and can be triggered
when preview is enabled both in preferences and in a child document
inset. For a minimal example, see the following ML thread:
https://www.mail-archive.com/search?l=mid&q=20191209002609.6fao3dljtf3ohl25%40tallinn
This fix restores behavior to before that commit for the case when
oldEnc is 0.
2019-12-10 09:17:49 -05:00
Jean-Marc Lasgouttes
2e784b2f06
Fixup e1be71da
: do not enforce plain layout when dissolving
...
Instead of checking whether the dissolved inset enforces plain layout,
it is better to check whether is uses plain layout.
Fixes #10369 .
2019-12-06 10:23:03 +01:00
Jean-Marc Lasgouttes
5ac3b88007
Disable inset-dissolve in table cells
...
This is better than making sure that the inset has exactly one cell.
In the future, inset-dissolve could be extended to dissolve all the
cells contents in the enclosing text.
Note that this check does not appear in mathed, and using dissolve in
e.g. fraction inset may lead to data loss (only current cell contents
is preserved).
2019-12-06 09:54:43 +01:00
Pavel Sanda
88ff1686bc
typo
2019-11-21 17:13:47 +01:00
Pavel Sanda
ae16abf57a
Reduce number of strings (the same one in buffer).
2019-11-21 17:11:09 +01:00
Juergen Spitzmueller
ed44bc9b12
Fix crash with polyglossia and intitle commands when lang_auto_end is false
2019-11-21 08:38:21 +01:00
Juergen Spitzmueller
772f2a2841
GuiSelectionManager: fix getSelectedIndex for availableLV
2019-11-20 14:07:05 +01:00
Juergen Spitzmueller
a426b33067
Fix issues with tilde in inputpath
...
Fixes #11699
2019-11-20 11:57:32 +01:00
Juergen Spitzmueller
e75fa6f3ac
Re-fix #11146 with recent LaTeX
2019-11-20 11:48:18 +01:00
Juergen Spitzmueller
5d45c10fc7
Fix crash in selection manager
...
Patch by Patrick De Visschere
2019-11-19 13:47:32 +01:00
Juergen Spitzmueller
1a1adbc821
Handle paragraph direction switch in captions (with polyglossia/bidi)
2019-11-19 13:45:35 +01:00
Juergen Spitzmueller
967158c054
Always use local font switches in table cells.
2019-11-17 11:07:18 +01:00
Jean-Marc Lasgouttes
49ed5b4626
Add a setBuffer method to InsetArgumentProxy
...
This is needed to set the buffer of default values of optional arguments.
Fixes bug #11695 .
2019-11-15 20:43:00 +01:00
Kornel Benko
c9c86b4966
Cmake build: Remove warnings about deprecated policy CMP0069
...
Deprecated since cmake version 3.16
(Now explicitly enable/disable interprocedural optimization
if supported and not debugging)
2019-11-09 16:56:16 +01:00
Pavel Sanda
d6b108d8c3
Support C++98 again (gcc 4.8).
2019-11-06 15:54:27 +01:00
Jean-Marc Lasgouttes
2a2019d77e
Constify and un-constify
2019-11-06 10:36:21 +01:00
Jean-Marc Lasgouttes
69fca0df1a
Amend 464d6262
: Forgot these
2019-10-27 00:17:27 +02:00
Jean-Marc Lasgouttes
d9edf32b67
Remove some useless expressions
...
Spotted by cppcheck
2019-10-27 00:09:05 +02:00
Jean-Marc Lasgouttes
464d6262b1
Simplify boolean expressions
...
Spottd by cppcheck.
2019-10-27 00:08:02 +02:00
Jean-Marc Lasgouttes
c73d397d32
Do not use same name for members and arguments
...
Spotted by cppcheck.
2019-10-27 00:06:54 +02:00
Jean-Marc Lasgouttes
68c88bc427
Use unsigned values for enum
...
Otherwise 1 << 31 overflows.
Spotted by cppcheck.
2019-10-27 00:05:41 +02:00
Scott Kostyshak
75bbe37495
Improve tooltip of "Save as Document Defaults"
...
The new message is shorter and also specifies that these defaults
are for new documents.
2019-10-26 14:46:33 -04:00
Juergen Spitzmueller
3c0e0f8a29
Polish warning
2019-10-26 09:10:40 +02:00
Juergen Spitzmueller
1c0572f1ab
Validate if graphics path is encodable
...
Fixes #11688
2019-10-26 08:33:51 +02:00
Jean-Marc Lasgouttes
067d6dc759
Mark insets with invalid buffer() in red in devel-mode.
...
We tend to have insets which buffer() member is invalid. To help
debugging, this commit paints their background in red when devel-mode
is on.
To this end, a new method develMode() is added to the Painter class.
With this commit, it is easy to see that macro template do not have a
proper buffer set!
2019-10-21 17:24:24 +02:00
Jean-Marc Lasgouttes
44816adce6
Be careful before using buffer parameters in colAlign
...
Make InsetGrid::colAlign a normal method and make it check whether
buffer is valid before using it. This avoids crashes as we have seen
in 2.3.3 (see e.g. #11686 ).
There is still an assertion so that failure is noticeable before release.
2019-10-21 17:02:39 +02:00
Jean-Marc Lasgouttes
19abf29ea0
Set buffer when expanding macro
...
This avoids a crash in InsetMathSplit which uses the buffer() value.
Fixes bug #11686 .
2019-10-20 12:54:59 +02:00
Jean-Marc Lasgouttes
58d22e0c6e
Keep last file positions in last-use ordering
...
Using a map would sort the elements in alphabetic ordering, which
means that when the number of elements is larger than 100, the wrong
elements get pruned.
This commit uses a list instead. Searching an item needs linear time,
but this should not be a problem for a list with less than 100
elements.
Fixes bug #10310 .
2019-10-20 12:37:27 +02:00
Jean-Marc Lasgouttes
1ac5c937fb
typo
2019-10-07 15:31:30 +02:00
Jean-Marc Lasgouttes
f009138f9c
Revert "typo"
...
An unrelated change slipped in.
This reverts commit 3b642cd0ed
.
2019-10-07 15:31:10 +02:00
Jean-Marc Lasgouttes
3b642cd0ed
typo
2019-10-07 15:10:52 +02:00
Jean-Marc Lasgouttes
bdf58b77e7
Fix bad caret position with horizontal scrolling
...
Horizontal scrolling used to be taken into account when updating caret
geometry. This is wrong since it may have changed when time comes to
draw the caret. This leads to a situation where the first apparition
of the caret is at a wrong place.
Now the extra horizontal offset is used at drawing time.
Fixes bug #11603 .
2019-10-07 12:31:20 +02:00
Enrico Forestieri
0573bf92e0
Fix bug 11667
...
When automatic command termination was added to texstream it was
forgotten to reset its status after a math inset.
2019-09-28 16:08:06 +02:00
Jean-Marc Lasgouttes
8778e76a98
Pass some variables as reference
...
Spotted by cppcheck.
2019-09-17 23:22:35 +02:00
Jean-Marc Lasgouttes
912704511b
Make some constructors explicit
...
Spotted by cppcheck.
2019-09-17 23:15:09 +02:00
Jean-Marc Lasgouttes
3fffa6eb83
Fix cut-n-paste error
...
Spotted by cppcheck.
2019-09-16 00:47:47 +02:00
Jean-Marc Lasgouttes
3aba81cf6a
Many small code cleanups suggested by cppcheck
2019-09-16 00:45:20 +02:00
Jean-Marc Lasgouttes
7c1891e0b4
Remove unused private members.
...
Spotted by cppcheck.
2019-09-16 00:17:08 +02:00
Jean-Marc Lasgouttes
a7c6940f14
Get rid of useless affectation
...
Spotted by cppcheck.
2019-09-16 00:03:56 +02:00
Jean-Marc Lasgouttes
c6d8592ffb
Mark constructors with only one parameter as explicit
...
Spotted by cppcheck
2019-09-16 00:01:48 +02:00
Jean-Marc Lasgouttes
8d080364d2
Clarify calculation precedence for '&' and '?'
...
Spotted by cppcheck
2019-09-15 23:57:57 +02:00
Jean-Marc Lasgouttes
decd2c74f1
Mark constructors with only one parameter as explicit
...
Spotted by cppcheck
2019-09-15 23:56:17 +02:00
Jean-Marc Lasgouttes
19fb4db71e
Make code more obvious
...
- use propoer parenthesis
- do not store in variable something we do not use
Spotted by cppcheck.
2019-09-15 23:31:32 +02:00
Jean-Marc Lasgouttes
02d55ab0b3
Avoid useless test
...
Spotted by cppcheck
2019-09-15 23:30:29 +02:00
Jean-Marc Lasgouttes
b42e6e96d8
Pass variable by reference
...
Spotted by cppcheck
2019-09-15 23:29:47 +02:00
Jean-Marc Lasgouttes
17c827d177
Various fixes suggested by cppcheck
...
Rename local variables the hide other ones: get_binary_path, find_python_binary
Use unsigned int for conversion from hex using sscanf().
FileName::checksum(), parsecmd (SystemCall): use explcit values rather
than variable which value is known.
2019-09-13 22:37:16 +02:00
Jean-Marc Lasgouttes
e3c5987806
Forgot to test aspell and hunspell support
2019-09-13 19:01:26 +02:00
Richard Kimberly Heck
c2f5c850d9
Use const &
2019-09-13 11:49:29 -04:00
Jean-Marc Lasgouttes
714113655a
Follow some of the performance advice from cppcheck
...
Most of that is changing string to string const &.
2019-09-13 16:23:49 +02:00