This commit follows 8d2b121e and is not expected to change
functionality (e.g., I confirmed that the cases of #7330 and #11106
are still fixed). The advantages of this refactoring are the
following:
- Remove some preprocessor directives:
processingThreadFinished() is only called in the case that
EXPORT_in_THREAD is 1, so by moving some code up in the call list,
the directives are not needed.
- If errors() is called when there is no error, there will not be unexpected
behavior (e.g., as was the case before 8d2b121e).
Note that errors() is still only called by the code touched by this commit
if there is an error, but that is for efficiency and readability.
- The "from_master" argument now has a constant meaning. Before, it
could be the case that "from_master" was set to false but that the
master's error dialog was shown.
If a master document is compiled and has errors, and then a child is
compiled without error, the errors from the master compilation were
shown.
The setup of the relevant code is the following:
processingThreadFinished() calls errors(). errors() makes the
assumption that if it is called, there must have been an error
somewhere.
The logic of the setup is the following:
processingThreadFinished() knows whether there was an error on
the most recent preview/export, although it doesn't know whether
the error is from master or child (i.e. does not know whether the
user was compiling the child, or whether master-buffer-view was
called). Inside error(), if there is no error in the child, it is
assumed the error is from master.
For the above logic to work, errors() should only be called if there
was an error.
This commit fixes#11106 and preserves the fix to #7330.
There are more independent crashes occuring in this scenario and this
fix targets only one of them, in particular the one in which different
window's outliner sends outliner command to a wrong window. The fix
itself gives an option for lfun to know which window it belongs to.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg203619.html
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.
I am rather irritated we didn't do this already, since synchronous runs
with BUFFER_VIEW or BUFFER_UPDATE leads to all sorts of problems,
including crashes.
Fixes the crash in #8338 (but not the bug itself).
Since CheckTeX itself processes the tex file, a synchronous run with
a TeX process can lead to all sorts of conflicts, including crashes.
Fixes: #7434.
The issue here was that the element was only removed from the queue
after the func request was processed, but within that process, other
function could access the queue, so the queue could even be empty
when this function finally wanted to remove the item.
Fixes: #10406.
A brand new event compressor based on Kuba Ober's cleverly simple
solution: <https://stackoverflow.com/a/21006207>.
Fix#9362, #9461, #9933: Lyx suddenly gets keyboard keys wrong, and
deadlocks
Fix#9790: LyX should perform key event compression (for improving the
remote X connections one would also need to implement
Qt::WA_KeyCompression)
Fix#10516: slowness on repeated arrow keys with IBus and Qt5
Patch pulled from
https://github.com/gadmm/lyx-unstable/commit/bf5a1efb0db5bfc2b
Signed-off-by: Juergen Spitzmueller <spitz@lyx.org>
It is not good for a support function to depend of anything outside of
it, especially Application.
Here the boolean that indicates that export should be canceled is put
in Systemcall. This allows to remove all the dummy theApp() function
that have been added here and there for linking needs.
This gets rid of the hardcoded latin1 encoding for verbatim. Instead,
verbatim now inherits the encoding from the context, which is what is
actually wanted here.
Fixes: #9012, #9258
This had the effect that for file dialogs supposed to use two buttons,
only the second one was displayed, while file dialogs supposed to use
one button did not have a button at all.
Candidate for 2.3.x and 2.2.x.
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 24c29908.
Now the helper class contains logic that checks whether buffer are
known before closing them. This avoids potential crashes.
Use it in different places to siplify code. It is not clear at this
point whether it should be used everywhere.
Followup to bug #10847.
When a buffer is in an embedded work area (adv. find&replace), it is
not found by BufferList:::exists(), and therefore the undo group
created in GuiApplication::dispatch and in the handling of
LFUN_COMMAND_SEQUENCE will not be closed.. Crashes can ensue, as
described in Ubuntu bug:
https://bugs.launchpad.net/bugs/1737429
The solution is to introduce BufferList::isInternal and act on it.
Fixes bug #10847.
- 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
Instantiating a single QSettings and using it for each ui element
can significantly shorten the time required to save the various
states at exit. The speed up can be better appreciated on *nix,
where the settings are saved on disk, rather than on Windows where
they are held in memory (in the registry).
The current spelling is not strictly wrong, but flagged as unusual or
historical by some authorities. It is also found fault with many
spell checkers. Thus we decided to move to the more standard "-ible"
form once and for all.
See #10678 for discussion
This part covers the most tricky part: the internal naming.
Translations and layouts will follow.
This will all also all be backported to 2.3.x, for the sake of backwards
compatibility (cherry-picking).
* 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.
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.
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.
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.
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).
This change solves dialog stacking problems on newer Mac OS X in combination with the OS provided file open dialog.
(cherry picked from commit 97dc585138)