Extensions: Undo makes every second page unselectable
<!-- See our full bug reporting guidelines at https://inkscape.org/contribute/report-bugs/ Writing a good bug report will ensure we'll be able to help efficiently. 🙂 --> #### Summary: <!-- Summarize the issue/suggestion concisely: --> When running an extension (such as Render extensions) and doing undo, every second page becomes unselectable. #### Steps to reproduce: <!-- Describe what you did (step-by-step) so we can reproduce: --> - open Inkscape - Add a few pages using the Add button of the page tool - Run an extension, i.e. Render -> Calendar - Press undo #### What happened? - Every second page (page 3, 5, 7...) becomes unselectable and the outline looks different. - Warnings in the console: ``` ** (org.inkscape.Inkscape:37317): WARNING **: 23:14:35.025: Can't get page index for page1132 ** (org.inkscape.Inkscape:37317): WARNING **: 23:14:35.026: Can't get page index for page1134 ** (org.inkscape.Inkscape:37317): WARNING **: 23:14:35.026: Can't get page index for page1136 ** (org.inkscape.Inkscape:37317): WARNING **: 23:14:35.026: Can't get page index for page1138 ** (org.inkscape.Inkscape:37317): WARNING **: 23:14:35.027: Can't get page index for page1140 ``` #### What should have happened? Document returns to the state before running the extension. <!-- Attach the sample file(s) highlighting the issue, if appropriate. --> #### Version info <!-- Open 'Help > About' and click on the little bug icon in the bottom right corner that copies the debug information to your clipboard. For command line users, run 'inkscape --debug-info'. For Inkscape 1.0.2 and older, please manually add the Inkscape Version and Operating System Version. The Inkscape version is listed in the About dialog. For command line users, run 'inkscape -V' Paste the information in the empty space between the apostrophes below: --> ``` Inkscape 1.2-alpha (469c0bbb72, 2022-02-06) GLib version: 2.64.6 GTK version: 3.24.20 glibmm version: 2.64.2 gtkmm version: 3.24.2 libxml2 version: 2.9.10 libxslt version: 1.1.34 Cairo version: 1.16.0 Pango version: 1.44.7 HarfBuzz version: 2.6.4 OS version: Ubuntu 20.04.3 LTS ``` <!-- ❤️ Thank you for filling in a new bug report, we appreciate the help! ❤️ Please be patient while we try to find the time to look into your issue. Remember that Inkscape is developed by volunteers in their spare time, we'll try our best to respond to all reports. --> <!-- Please be careful when/after writing # for example in logs, code, or versions of linux - use inline code span - single backticks (`) before and after it, like this - `inbox#1618` - use multi-line code block - triple backticks (```) to fence/enclose console logs - attach long logs as a text file. -->
issue