I like that it is easy to pop an object out of a group. But, for organising objects I often want to merge 2 groups together. Or also add a new object to an existing group. Are there any commands to do these?
I know I could cut and paste into the group, or use the Object manager and drag and drop into the group. Or even convert the group to a layer and use Move to Layer. But for something more direct, like a "Join to Group" command would be quicker.
Can't you just select both groups, them group them again (with Ctrl + G)? That will give you a group made up of two sub-groups.
To add a new object to a group, right click on the group and look down at the bottom of the pop-up menu. There's an option that says 'Enter group #[xxx]'. Click that and you can add new shapes/edit existing shapes all within the group.
I think the fastest/easiest way to merge two groups (so that you end up with a single group containing all the objects from the two groups) is to select both groups then click the 'Ungroup' button in the toolbar, immediately followed by the 'Group' button (or use the keyboard shortcuts if you prefer). It's not technically merging them - it's replacing two groups with a new single group - but for 99% of use cases the result will be the same, and only requires a couple of clicks.
The same approach can be used to add non-group objects to an existing group - just select the item(s) and the group at the same time, then click the two buttons in order.
@z3z I'm trying to avoid unnecessary groups within groups. As navigating up and down the hierarchy gets messy. In complex drawings I like to keep things "clean" for some reason.
@Xav Thanks. A 2 click solution is almost OK. But it loses the group name of the target group. And can also lose the stack position if the item you are adding is somewhere above the group in the stack.
A workaround is to switch the Group to be a Layer using the Object manager. Then using Move to Layer achieves the aim. I also switch a group to a Layer, so I can rename them in the Object manager. But I switch them back to groups again. I wonder if there is any disadvantage to leave them as layers? On-canvas selection for example. Another way is to drag and drop in the Object manager. But you need to locate both items in the list first, and with a long list they are often not visible at the same time. So it's quite hard or impossible to do.
So I currently think that there should be some new requirements:
Add a Join to Group or Move to Group command. Maybe carefully combining it with the Move to layer command to avoid UI clutter.
Rename Layer could become just Rename. And allow renaming of anything selected. Objects, Groups, Layers etc. Edit: Double-click in Object manager starts rename. =OK
I like that it is easy to pop an object out of a group. But, for organising objects I often want to merge 2 groups together. Or also add a new object to an existing group.
Are there any commands to do these?
I know I could cut and paste into the group, or use the Object manager and drag and drop into the group. Or even convert the group to a layer and use Move to Layer. But for something more direct, like a "Join to Group" command would be quicker.
Can't you just select both groups, them group them again (with Ctrl + G)? That will give you a group made up of two sub-groups.
To add a new object to a group, right click on the group and look down at the bottom of the pop-up menu. There's an option that says 'Enter group #[xxx]'. Click that and you can add new shapes/edit existing shapes all within the group.
I think the fastest/easiest way to merge two groups (so that you end up with a single group containing all the objects from the two groups) is to select both groups then click the 'Ungroup' button in the toolbar, immediately followed by the 'Group' button (or use the keyboard shortcuts if you prefer). It's not technically merging them - it's replacing two groups with a new single group - but for 99% of use cases the result will be the same, and only requires a couple of clicks.
The same approach can be used to add non-group objects to an existing group - just select the item(s) and the group at the same time, then click the two buttons in order.
I discuss grouping in Chapter 2 of my tutorial at
https://roy-torley.github.io/Inkscape_Tutorial/Tutorial02/Tutorial02.html
If it provides you any insight, then it's doing its job.
I wish you success!
Thanks for all your replies
@z3z I'm trying to avoid unnecessary groups within groups. As navigating up and down the hierarchy gets messy. In complex drawings I like to keep things "clean" for some reason.
@Xav Thanks. A 2 click solution is almost OK. But it loses the group name of the target group. And can also lose the stack position if the item you are adding is somewhere above the group in the stack.
A workaround is to switch the Group to be a Layer using the Object manager. Then using Move to Layer achieves the aim.
I also switch a group to a Layer, so I can rename them in the Object manager. But I switch them back to groups again. I wonder if there is any disadvantage to leave them as layers? On-canvas selection for example.
Another way is to drag and drop in the Object manager. But you need to locate both items in the list first, and with a long list they are often not visible at the same time. So it's quite hard or impossible to do.
So I currently think that there should be some new requirements:
Edit: Double-click in Object manager starts rename. =OK
I realise this does not make anythings easier, but you can also drag and drop in the XML editor too. Just though I would mention.
I added this as a request: https://gitlab.com/inkscape/inbox/-/issues/4561