[LyX/master] Implement reference-to-paragraph in outliner (#1624)

Jürgen Spitzmüller jspitzm at gmail.com
Mon Jul 29 06:50:31 UTC 2024


Am Sonntag, dem 28.07.2024 um 14:43 -0400 schrieb Richard Kimberly
Heck:
> I played around with it a bit, and it seems to work well, for the
> most part. In particular, it does fine with duplicate section
> headings, etc.

Very good.

> But I did run into one problem. Create a new document. Make it look
> like this:

Strange, I cannot reproduce.

However:

> [reference-to-paragraph] is disabled at this location
> frontends/qt/GuiApplication.cpp (5f0): dispatch msg is `Command
> disabled'

This might give a hint. I messed up the definition of the lfun, maybe
this was the reason? Please check after 2fdeee4bf78d8.

Otherwise, the function is only disabled if:

* par ID is < 1 (which shouldn't happen AFAIU)
* the TocItem does not have a valid DocIterator

The latter does only apply to the Outliner. So you could also test if
the lfun itself works by using

reference-to-paragraph 1

> frontends/qt/GuiApplication.cpp (5f0): dispatch msg is `'
> 
> If I save the document, then it works. It also does not seem to
> happen 
> if I load a document from disk---hence the need to create a new 
> document. It does work to insert a reference
> 
> I saw the note on the bug report about extending this to the cross-
> ref dialog. I'd be happy to do that part, once this is otherwise
> stable.

Thank you, this would be great. We'd might need to move some code from
TocWidget to TocModel (or even TocBackend) to give access to that
dialog. The move is probably a good one anyway. In any case, I'll be
happy to help out on this.

-- 
Jürgen


More information about the lyx-devel mailing list