There are two techniques that I know of for forcing the direction of a
string, regardlessly of whether its contents is naturally LtR, RtL or
undecided.
1/ The unicode LTR/LTR override characters. This is supposed to be the
clean way, however, it does not seem to work with Qt 5.14 (see
#11691).
2/ The undocumented QTextLayout::setFlags method. This is used
internally and allows to pass the (undocumented) flags
Qt::TextForceRightToLeft and Qt::TextForceLeftToRight. This was
used until we had issues with Qt 5.11 (see #11284).
In order to get the best of both worlds, this patch allows to enable
those two methods separately, and actually enables both at the same
time by default!
(hopefully) Fixes bug #11691.
1/ The most annoying part was the error in po/. It turns out that reading
and understanding the po/Makevars file was the key. A simple change of
variable ensures that "make dist" does not try to rebuild lyx.pot.
2/ The way tests in src/ are defined meant that the
dependency-tracking files were not all deleted. This should be OK now.
Now RenderGraphics adds offsets that depends on its parent inset.
These offsets are set to 0 for InsetGraphics and InsetExternal. A nice
consequence is that icons shown by Info inset stick out less on screen.
As an unrelated change, the "private:" specifier of these two insets
is moved to a more reasonable place.
The basic value is Inset::textOffset(BufferView*), which can in theory
change with the BufferView zoom and dpi. It is hardcoded to 4 for now.
Moreover, we introduce the virtual inset methods
(top|bottom|left|right)Offset, which can be tweaked for each inset.
No change intended (for now).
Move cursor at beginning of selection after deletion. Else backspace
operation gets stuck in a loop (tries to remove the selection again
and again).
This also fixes backspace deletion of insets with confirmDeletion() == true.
Fixes#11630
This is a reimplementation of 6d4e6aad that is both simpler and more
complete.
This uses the updateBuffer mechanism to implement a fully working
version of Inset::isChanged(). Now the function returns true for an
inset that contains an inset that contains a change, for example.
Moverover Buffer::areChangesPresent() is merely a proxy for
Buffer::inset().isChanged().
We will replace this with a better solution
For now, only keep
- Changes::isChanged()
- Buffer::areChangesPresent(), replaced by a dummy function
Next step will be to provide a working areChangesPresent() and to
compute Inset::isChanged in updateBuffer.
This reverts commit 6d4e6aad24.