Internal PDF linking: Links to wrong object

Summary:

In my first test, the new feature failed to link to the correct objects.

Steps to reproduce:

  • open anchors_proof_of_concept.svg
  • confirm that:
    • link for chapter 1 goes to chapter 1 text,
    • link for chapter 2 goes to chapter 2 text,
    • and link for chapter 3 goes to the last page, which happens to be called page7 for some odd reason.
  • export to a single-file, all-pages PDF

What happened?

  • Link for chapter 1 goes to chapter 1 text
  • Link for last page goes to last page
  • Link for chapter 2 goes to chapter 3 text

What should have happened?

Each link should be leading to the correct item.

Version info

Inkscape 1.4-dev (07fdc5641e, 2024-03-10)

                      Compile  (Run)
    GLib version:     2.72.4
    GTK version:      3.24.33 (3.24.33)
    glibmm version:   2.66.2
    gtkmm version:    3.24.5
    libxml2 version:  2.9.13
    libxslt version:  1.1.34
    Cairo version:    1.16.0 (1.16.0)
    Pango version:    1.50.6 (1.50.6)
    HarfBuzz version: 2.7.4 (2.7.4)

    OS version:       Linux Mint 21.3
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information