Resizing the first/only page to selection/drawing using the page tool ignores selection

Summary:

Using the 'Resize Page to Selection/Drawing' from the page toolbar resizes the first page to the drawing, ignoring any selected objects. Could not find duplicates with ToolPages 😅 - bisection points to b4ff126ea86b1ae47bbdb08f73b89a22266ef5db

Steps to reproduce:

  • open Inkscape
  • Create two rectangles
  • Switch to Page tool with one rectangle selected
  • Resize Page to selection from the toolbar

What happened?

Page resized to 'Drawing'.

What should have happened?

Selection should have been used for resizing

Version info

Inkscape 1.2-alpha1 (f32a55a, 2022-04-04)

    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.17.6
    Pango version:    1.44.7
    HarfBuzz version: 2.6.4

    OS version:       Ubuntu 20.04.4 LTS

Edited by KrIr17