No layer selected after search in Layers dialog (pastes end up in root layer)

Summary:

I found a way to paste onto a layer not listed in the layers dialogue. Discovered the bug by hiding all layers only to find objects still visible.

Steps to reproduce:

  • open Inkscape
  • Draw an object
  • copy the object
  • open the layer dialogue
  • type any text so that the layer search feature opens. Keep typing until you aren't matching any layer and all layers are deselected.
  • click off the layer dialogue onto the canvas
  • congratulations! you're on the secrete layer, you can now ctrl-v the copied object onto the canvas
  • hide all layers in the dialogue and see that your pasted object is still visible.

What happened?

I pasted the object onto an extra layer which can't be locked or hidden. I'm now free to work on this layer as any other.

What should have happened?

I'm not sure. I'm guessing a default layer should have been selected for pasting, maybe the top or bottom layer. (Unless this is intended behaviour!?)

Version Info:

Inkscape 1.2-dev (1:1.0+devel+202105211232+67eecee920)

    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.2 LTS
  • OS: The lubuntu distribution with i3 windows manager.
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
Edited by Nathan Lee