move selection to another layer without expanding sublayers

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

move selection to another layer without expanding sublayers

Postby brynn » Tue Oct 19, 2010 3:14 am

Hi Friends,
I want to submit this as either a bug or new feature request (it seems to be kind of a gray area to me). But before posting in Software Issues forum, I want to make sure there's not already a way to do this.

I have multiple layers and sublayers, looking something like this in the Layers dialog:

  • +Layer 4
  • -Layer 3
    • sublayer 3.1
    • sublayer 3.2
    • sublayer 3.3
  • -Layer 2
    • sublayer 2.1
    • sublayer 2.2
  • -Layer 1
    • sublayer 1.1
    • sublayer 1.2
    • sublayer 1.3

Notice how I've used plus and minus signs to indicate whether a layer is expanded (-) to reveal the sublayers, or shrunk (+) to hide the sublayers. Layer 4 actually has 4 sublayers, but it's not expanded in my example.

Ok, let's say that I have Layers 2 and 3 shrunk, while Layers 1 and 4 are expanded. I'm drawing on sublayer 4.2, tracing details from an original photo, which is in sublayer 1.3. But I'm periodically turning sublayer 4.2 off and on (using Layers dialog eye icon), so I can see if I'm getting the details close to correct. Now and then, I forget to click sublayer 4.2 in the Layers dialog, to make sure I'm drawing on the right layer, so that I end up drawing on sublayer 1.3. No problem, right? I just select what I drew on sublayer 1.3, and use Shift + PageUp, to move it up to sublayer 4.2 where it belongs.

The problem for me, is that whenever I engage Shift + PageUp, when I reach the shrunk layers 2 and 3, it automatically expands them. This is not a huge problem, of course. But it's just annoying to have to then scroll the layers dialog, and shrink layers 2 and 3, to keep them out of the way, while I continue working.

There are a few different ways I can think of, that would help here -- mainly for Shift + PageUp not to expand layers and sublayers that are shrunk. Although, I can see how that is necessary, for example, if I wanted to move it to a sublayer in a shrunk layer.

So other ideas:
  • if there were some way to move the selection to the topmost layer (I'm thinking Shift + Home) (or to the bottom-most layers (Shift + End)), then I could jump it to the top, then move it 2 keystrokes down to sublayer 4.2, and avoid moving through layers 2 and 3, thereby expanding them. So iow, making "Move selection to" with the same functionality as "Move layer to"
  • OR even better, if there were some dialog with which I could just assign it to whatever layer or sublayer I want

Or is there already a solution, or workaround, for this scenario? I'll bet some of you wise Inkscapers can come up ideas or tricks, lol.
Thanks for your help :D

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: move selection to another layer without expanding sublayers

Postby Grobe » Thu Oct 21, 2010 12:37 am

Good idea.

What about having a check box with following text next by:
ImageDont expand layer tree when moving objects through layers.
:lol:

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: move selection to another layer without expanding sublayers

Postby druban » Thu Oct 21, 2010 4:42 am

Hi Brynn. I don't have an answer to your exact question but I'll tell you how I do this sort of thing.
Don't use the layers dialog box. Instead, with your object selected, open the xml editor (ctrl-shift-x). your object will be selected and only the layer that it is in will be expanded. just drag it to the layer you want it to be in. if you want it to be in a sublayer that's not visible drag it to the layer and then drag it to the appropriate sub once the layer expands. for moving objects and groups - and even layers and sublayers, which you can't do in the main window - the xml tree is much more functional than the keyboard shortcuts IMHO. For example you can make a layer into a sublayer just by dragging and indenting or you can make a sublayer into an independent layer. Try it, and you probably won't go back to the old way.

P.S. I should point out that in the latest IS 0.48 there is a small bug in that if you rename a layer in the xml editor it will update the layer name displayed on the status bar but NOT in the layers dialog until you save and reopen.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: move selection to another layer without expanding sublayers

Postby brynn » Thu Oct 21, 2010 12:43 pm

Well that's very clever!
So if I use the XML Editor to move something to another layer, does it stay in exactly the same place on the canvas? I mean, does it work just like Shift + PageUp? Or would I have to move it back to its original place on the canvas?

Thanks druban :D

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: move selection to another layer without expanding sublayers

Postby druban » Thu Oct 21, 2010 5:26 pm

None of the numerical data changes. You are just moving it from one group (layer=group) to another and changing its z order.
Your mind is what you think it is.


Return to “Help with using Inkscape”