Undeleting layers - visibility and sort index not preserved

If I delete a layer that is not visible (blue lamp icon) and then undo the delete, the layer is added to be bottom of the layer list and its lamp icon turns yellow.

It would be nice if visibility and sort order are preserved when the layer is undeleted. If anything, the visibility is most important to preserve, although finding a layer where you were expecting it is also nice.

1 Like

Hi Menno- I see that, thanks.

http://mcneel.myjetbrains.com/youtrack/issue/RH-28047

-Pascal

Also, if I have a parent and child layer both hidden and I delete the child layer, upon undo, the child layer is visible (yellow bulb) even if the parent layer remains hidden (blue bulb). I do not understand how the child layer visibility is able to override the parent layer visibility in this scenario

Hi Daarshini -

In a quick test, I can’t make that happen here.
Please post the outcome of the Rhino SystemInfo command and a 3dm file in the state before you delete the child layer.
-wim

@wim @Daarshini_Rajan I see that in both Rhino 7 and 8, in Rhino 8 I see even more weirdness.

3 Likes

I’m on R7SR23 and I see that too. Steps to reproduce:

  1. create a layer and a sub-layer.
  2. set all to hidden (blue lamp)
  3. delete the child layer
  4. Ctrl+Z to undo

Result: child layer is added back, but visible (yellow-lamp icon). I would expect it to return in hidden state (blue lamp icon).

The same happens with lock-status. If I lock the child layer, then delete+undo, the lock status is unlocked instead of locked.

1 Like

thanks @menno for the additional info

I logged: RH-73689 Hidden and locked states of deleted child layers is not restored after undo

2 Likes

Hi!
I use rhino7 and have some issues when I do a Ctrl+z. When I run a python script that creates new layers and/or play with layers visibility within a script, and then do a Ctrl+z on my keyboard after the script is done running, the layers go back but not their previous visible or locked state. Instead, their states becomes like it was at some point within the script command.
For example, I have a script that essentially start by creating a layer and then hide all the layers contained in a list (to exclude the ones I want to keep visible) to do a -_print operation. At the end on the script, the created layer is purge and the other layers visibility and locked states are all return to their previous states.
But then, after the script finishes, if I want to go back to change something I did before the script and I do a Ctrl+z, the layers go back to the state they where in when I did the print operation.

Does anyone know how to correct that ?