Bug? Using Size Shape of selected shape in cell, removes the shape from the cell


I am new to KLayout and have been heavily trying to use it.
I came into what i believe is a potential bug or behavior error (compared to other tools i used). Here how it goes:

  • Create a child cell inside of top cell and draw any shape inside it
  • Define top cell the one the highest in hierarchy
  • Disable "Select Top Level Objects"
  • Select the Shape inside the child cell without going inside the cell using Descend
  • Use Size Shapes to apply a resize

What happens is that the shape is correctly resized, but moved outside the child cell, to the defined Top Cell. It's if like the shape was flattened. For me, this behavior should not occur and the resized shape should stay inside its cell. I am wondering if i am doing anything wrong, or if there an option to change the current behavior.

Thank you for your comments and feedback.
Keep up the good work with this excellent tool!

Best regards,


  • @Adonix Thanks for your feedback :)

    Actually that's how it's implemented. "Size Shapes" is a flat function and will operate on the cell layout you're working at. Pulling shapes from a child cells will put them into the current cell.

    My recommendation is to use "Select top level objects only" from the "View menu". This will confine your selection to top level objects and not make you modify a child cell. Modifying a child cell is risky as child cells may be used somewhere else and you may not want to modify the cell in all other places.

    If you want to modify a child cell, you can select it and descend into this cell (Display/Descend or Ctrl+D). After modification you can return with Display/Ascend or Ctrl+A.


  • Hi Mathias,

    Thank you for your answer.
    I am well aware of the risk of changing the cell affecting other places. That's the logic behind cells :smile:

    Indeed, navigating inside the cell with Ctrl+D solves this issue, but i was hoping for an option to keep the resized shape inside its cell, regardless of current position in the hierarchy as it originally belonged to a cell.

    Thanks again for your efforts! Keep up the excellent work!

Sign In or Register to comment.