Factor out the code that connects to a newly created dialog and then
use that also in GuiGraphics.
There must be many other dialogs that need this same treatment....
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.
This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).
Fix bug #11225.
If a macro has only optionals and none is specified and a [ immediately
follows, we have to terminate the macro with {}, otherwise what follows
is taken to be an optional argument.
Fixes#11665.
The bookmarks are added as virtual elements in display Rows. Bookmarks
are shown with circled numbers. A new color "bookmarks" has been
added. Currently bookmark 0 (the return position) is not displayed
because it is very disturbing in practice.
To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.
Force redraw when using bookmark-save and bookmark-clear.
Fixes bug #2496.
This avoids generating % for HTML or DocBook: % indicates a comment in TeX, but not in XML, it's just a character. The snippet that is shown is therefore not valid.
As suggested there, we attach ourselves to the newly created inset,
if we in fact just created an inset. (This will only matter if Apply
was clicked, so the dialog is still open, but I did the calcuation
anyway, as it seems cheap enough.) This allows the user to modify
that inset (e.g., change the format) and also prevents another click
on Apply, or OK, from creating another dialog.
I've also removed the override of disconnectOnApply(). It does not
work, anyway, I think because it only works with GuiDialog, not with
DialogView-based dialogs.
Otherwise we are unable to distinguish text from latex commands.
For instance '\color{blue}' in text-part is normal text, while othervise
it defines following characters as being blue colored)