Objects stay hidden when moving through hidden layers

Migrated from https://bugs.launchpad.net/inkscape/+bug/168636

Steps to reproduce:

  • open Inkscape
  • create two new layers (layer 2 and 3)
  • hide layer 2
  • create a shape in layer 1
  • move shape to layer 3 with Layer -> Move Selection to layer above

What happened?

The shape becomes invisible in Layer 2 (expected) and stays invisible in Layer 3 (unexpected).

moving_through_layers

What should have happened?

The shape becomes visible again in Layer 3.

Although it is possible to make it visible again by finding the shape in the Layers dialog, this is still annoying when often moving objects between layers.

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (3322b9cb, 2019-12-31)
  • Operating System: Windows 10
  • Operating System version: 10.0.18362

Summary of comments:

Reproduced with:

  • Inkscape 0.48+devel r10115, r10427 and 0.48.x r9819 (0.48.2) (tested on Mac OS X 10.5.8 (i386))
  • Inkscape 0.48+devel+13028 Ubuntu 13.10
  • Inkscape 0.91pre1 x64 and 0.48.4-1 x64 on Windows 8.1
  • Inkscape 0.91 r13725 and Inkscape 0.92.1 15371 on KDE plasma version 5.9.4
  • Inkscape 0.91 r13725 on Mac OSX Sierra 10.12.6
  • Inkscape 0.92+devel 15099 (GTK3), Arch Linux 64-bit, KDE Plasma 5
  • Inkscape 0.92.2, Mac OSX Sierra 10.12.5
  • Inkscape 0.92.3, on Windows 7 Pro
  • Inkscape 1.0beta, Mac Os Catalina 10.15
  • Not reproduced with 1.1-dev (f9311a1b) under Arch Linux 5.4.6-arch3-1
  • reproduced with Inkscape 1.1-dev (3322b9cb, 2019-12-31)

Root cause (by jazzynico):

When a layer is hidden, it gets a display:none value in the style attribute. When the object moves from the hidden layer, it inherits the display:none and keeps it wherever you move it.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information