GNOME Bugzilla – Bug 446171
select content by click on layer icon
Last modified: 2009-07-18 15:06:24 UTC
hi, i'd really like to have one feature from photoshop: selecting the layer's content by clicking the layer icon while ctrl is pressed. it's damn handy and i'm using it all the time while working with ps. thanks and keep the good work!
Please explain this in more detail. "Selecting the layer's content" is somewhat ambiguous and you should not assume that everyone working on GIMP has access to PS.
(In reply to comment #1) > Please explain this in more detail. "Selecting the layer's content" is somewhat > ambiguous well let's say you have a layer with a circle. now by ctrl+click the layer's thumbnail in the layer menu the circle is selected. maybe you have to try it out to see its potential. it might sound a bit trivial so far ... > and you should not assume that everyone working on GIMP has access to > PS. > i don't. it's just a very handy feature and i bet other gimp users would like it as well.
Sorry, still a little bit unclear. Right now it sounds to me as if it would do "alpha to selection" on the layer. Could you try to - create a circle - blur it heavily - Ctrl-Click Now, where is the "marching ants" outline? Does it contain all of the blurred areas or are they somewhere in the middle? When you cut out the selection, does the blurred circle disappear completely? Or are there traces left in the outer regions of the blurred circle?
(In reply to comment #3) > Sorry, still a little bit unclear. > > Right now it sounds to me as if it would do "alpha to selection" on the layer. > Could you try to > > - create a circle > - blur it heavily > - Ctrl-Click > > Now, where is the "marching ants" outline? it covers the original circle. > Does it contain all of the blurred > areas no > When you cut out the selection, does the blurred circle disappear completely? no > Or are there traces left in the outer regions of the blurred circle? > the blur is left
So it's the same as alpha-to-selection. It should be trivial to make ctrl-click on the layer thumbnail invoke this action.
well the layer has no mask nor an alpha channel. if i add a mask the selection is not affected. oh and the same works for the layer mask thumbnail.
In PS, CTRL-Click on a channel produces the same behavior (alpha to selection) - also pretty useful.
You mean channel-to-selection, probably. There is already a button for this. But perhaps it makes sense to overload the icons with obscure modifier keys and undiscoverable actions that only duplicate what's already there. That holds true for the original enhancement request also, btw.
Ctrl-click on the layer mask is already taken. Somehow I start to think we need to move this discussion to the mailing-list. In particular because after comment #6 it is again unclear what exactly this bug report is asking for.
my reservation: my team has found that the layer dialog needs sorting out in general (and I think there is consensus with the developers on this): - how to select/lock/show a layer/alpha/selection/layer mask - show an icon or thumbnail for layer/alpha/selection/layer mask? this can be within the layer dialog or sometimes outside it. included in this is a look at all the modifier keys in combination with (double) click as shortcuts for the actions above and further functionality, like channel-to-selection. Throwing in new functionality, as proposed in this bug report, right now would make our job more difficult later-on. So I ask for a bit of stability in the layer dialog until my team can work on it.
(In reply to comment #9) > Ctrl-click on the layer mask is already taken. Somehow I start to think we need > to move this discussion to the mailing-list. In particular because after > comment #6 it is again unclear what exactly this bug report is asking for. > well what else should i say. i described it as good as possible. ctrl-click the layer icon and get the layer's content selected. the best method is to grab a copy of ps and just try it if there're still some unclear issues.
No, you didn't describe it as good as possible, you could do a lot better. You could for example prepare some small examples and attach them here. Or you could describe a way to achieve the same result in GIMP. Or you could bring this up on the mailing-list, perhaps someone else can give a description that is good enough.
sorry for the delay. finally i had time to try several methods and you're right. the feature i meant is layer -> transparency -> alpha to selection (alt+a). so sorry for the hassle and i'd say this can be closed. thanks for your efforts!
Created attachment 92190 [details] [review] implements the suggested action on Ctrl-Click This patch implements the suggested action on Ctrl-Click. But I guess it does not quite work as expected by the bug reporter. Ctrl-Clicking a layer (or channel) preview still also selects the layer or channel. This would probably have to be changed before this is accepted.
> Ctrl-Clicking a layer (or channel) preview still also selects the layer or > channel. This would probably have to be changed before this is accepted. > yes, the original idea was that it'd only happen by clicking the layer's thumb/icon. thanks anyway!
We would have to change code in GimpContainerTreeView for this. Instead of selecting the item and then passing the click to the cell renderer, we would first process the click and only if the cell renderer doesn't handle it, select the item. This might allow for some interesting features but it appears to dangerous to try this now. Let's look at this again after the 2.4 release.
Would be nice to have but since no one started to do the necessary refactoring in GimpContainterTreeView by now, I am bumping this 2.8.
Created attachment 122514 [details] [review] alpha-to-selection-on-ctrl-click-2008-11-12.patch Updated for current SVN trunk.
IMHO it would be nice to do this on Alt so the Shift and Control modifiers could be used for the usual add,subtract,intersect stuff.
Created attachment 125300 [details] [review] alpha-to-selection-on-ctrl-click-2008-12-25.patch Updated for SVN trunk.
Created attachment 125959 [details] [review] Enhanced variation of the patch Changes: - selects on ALT (because we also use ALT in the image window for selection tihngs) - adds the same feature to the vectors dialog - adds add, subtract and intersect using the usual modifiers Now this could probably be abstracted to live in GimpItemTreeView, but that's a separate refactoring :)
Does this patch address the problems outlined in comment #16 ?
No.
*** Bug 587633 has been marked as a duplicate of this bug. ***
Committed the last patch as-is now (0d81ce97177c10c8aee1f6b1d4addb1f5429eb2a) The mentioned refactoring (don't select the item) is a separate thing and can be done on top. Closing as FIXED.