GNOME Bugzilla – Bug 313634
scissor tool does not allow to create holes into selection.
Last modified: 2008-01-15 12:58:48 UTC
1. select region with scissors (large enough) 2. switch scissors mode to "substract" 3. select smaller region inside the first selection. what happens: selection does not change. (gimp:4716): Gimp-Core-WARNING **: gimp_channel_combine_mask: unknown operation type expected: hole inside the first selection
Actually it works if you use the modifier keys instead of the buttons but that is of course not quite right.
The problem is actually in GimpSelectionTool. The state of the buttons should be kept separate from the state of the tool. That would fix the problem for other selection tools as well.
More info: I got it to work, but it isn't intuitive. The scissors area has to have some portion outside of the current selection. Oddly enough, it seems like if you take ANY button state of the intelligent scissors and make an area, but click on a portion where that area overlaps with the selection, it cancels the intelligent scissors. Now that I observe more carefully, I think it's because the intelligent scissors tries to do what any other selection tool does when you hover it over a selected area: move the selection. And when you do click on it, it cancels intelligent scissors. I'll assume the best fix is to have gimp stop canceling scissors and instead move the area if the user clicks and drags, otherwise if it's a single click then the intel scissors area is committed to the main selection. Sound good?
No, I don't think you understood the problem. The problem is actually a simple design bug in the GimpSelectionTool class that also affects other selection tools.
Fixed in HEAD. Setting milestone to 2.4. 2006-10-18 Michael Natterer <mitch@gimp.org> Separate selection tool function (select, move, cut, ...) from selection mode (replace, add, ...). Fixes bug #313634 (that bug wasn't triggered any more in HEAD, but was still there). * app/tools/tools-enums.h: renamed enum SelectOp to SelectFunction and replaced the values REPLACE, ADD, SUBTRACT and INTERSECT by a single value SELECT. * app/tools/gimpselectiontool.h (struct GimpSelectionTool): renamed member "op" to "function". Changed "SelectOps saved_op" to "GimpChannelOps saved_operation". * app/tools/gimpselectiontool.c: we always have the right GimpChannelOps in the tool options, so simply use it instead of mixing up unrelated stuff in one enum. Results is some medium-ugly nested switches, but is generally much cleaner than before. * app/tools/gimpforegroundselecttool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpiscissorstool.c * app/tools/gimpregionselecttool.c: changed accordingly. Use the operation from the tool options instead of selection_tool->op when making the actual selection.