We now use a new variable, "wrap", to track if a wrap should be
done, which is true either if "auto_wrap" is true or if the user
chooses to wrap in the dialog.
This preserves the meaning of the "auto_wrap" variable and also
removes the confusion of why the previous code of
if (!auto_wrap) {
...
}
if (auto_wrap) {
did not use an "else" instead of the second "if".
No change in functionality.
Does not change much, but Coverity complains about it. Let's see if
this allows Inset's child classes to grow their own move constructor.
Also some whitespace.
This requires the introduction of the booleans selected_left and
selected_right in PainterInfo. These tell whether the selection
continues at the left/right of the inset.
This information allows to
1/ paint equation number in the right color: either current text color
or selection text color.
2/ before that, paint a small background rectangle of the correct color.
This allows to avoid painting a large rectangle of an arbitrary color
that was the cause of the bug.
Fixes bug #12319.
When the cursor cannot move on cursor up/down, at least the selection
should be cleared (when not selecting).
To detect this, the method Cursor::upDownInText has been modified to
return true when cursor is at top/bottom of inset, but there is some
room above/below.
Moreover, introduce the functions LFUN_FINISHED_UP/DOWN, which is
dispatched at upper cursor level as long as no local movement is
possible. This allows to handle differently the original char moving
action and its consequences.
Fixes part of bug #12310.
Example: when a selection is set, a `Left' cursor movement would not
reset selection when the cursor was at the beginning of buffer.
To fix this, it is necessary, when cursor is in top-level text, to
avoid the mechnanism (undispatched cursor) that sends the action to the
upper level (necessary when the cursor leaves an inset).
The change is mechanical and is done for : char-backward,
char-forward, char-left, char-right, word-left, word-right, word-left,
word-right. It might be possible to factor this code a bit, but there
is no evident solution.
char-up/down are *not* handled at this point.
Fixes part of bug #12310.
The "benefit" row gives the amount of days in-between when an issue
is found because of the ctests and when an issue is reported by
someone not using the ctests. In the example of the ps2pdf flag, the
issue was reported just a couple of weeks after we found it with the
ctests, indicating that the ctests were not that helpful in this
case.
Since Qt 6.1 the moc, rcc, and uic compilers are not installed
in the bin dir anymore. We ask qmake for their location and
record them with full path so that it is not necessary thinkering
with the PATH variable.
Horizontally, the old code would count an extra pixel on the right.
The vertical test is not changed, and should be eventually audited.
Fixes bug #10468.