GNOME Bugzilla – Bug 562564
Impossible stroke a path with the clone tool
Last modified: 2018-05-24 12:28:25 UTC
Please describe the problem: The clone tool is in the option to stroke a path but option do not work Even if the clone tool source is correctly set a message pop out warning that clone tool can't work without a source. Steps to reproduce: 1. create or select a path 2. chose "stroke path" and in the dialog chose "clone tool " option 3. set a source for the clone tool and try to stroke Actual results: error message "no source selected" some reported instead then error message a gimp crash (http://www.gimptalk.com/forum/using-path-tool-and-stroking-that-using-clone-brush-t35896.html ) I may confirm only the error message and the impossibility to stroke with the clone tool Expected results: Since the clone tool is one of the option to stroke path that should work Does this happen every time? yes happen always on Windows, not sure about other OS Other information:
problem seems larger and more general Is not only impossible stroke paths but also selections More bug do NOT involve only the clone tool but any similar tool that require a source imagine as heal tool and perspective clone tool i do not know if is the case to open another bug report with a more correct title and mark this as duplicate ...or more simply somebody may edit the subject from " Impossible stroke a path with the clone tool" to " Impossible stroke paths or selections with clone, perspective clone and heal tools"
Confirming. Does happen if you choose a source before opening the stroke dialog, too.
Interesting bug. Not sure that UI-wise it is going to be simple to switch to Edit>Stroke path in the middle of the use of the paint tools, and even less sure that this capability would be obvious to users. IMHO it would be clearer/cleaner to have a "Stroke Active Path" button in the Tool options for all paint tools. It could forego the "Emulate brush dynamics" option: this option would be always active and would be disabled using the "Dynamics Off" dynamics.
Created attachment 318671 [details] [review] UNFINISHED This is my proposed UNFINISHED patch. As it is currently, it will allow the user to set a source with any kind of source tool (clone, heal...), and use the stroke dialog accordingly. It keeps a set source between tool changes by the use of source options. This means the user may set a source with the clone tool, work, switch to the heal tool, and if the user needed the original source, he/she won't need to set it again. Of course a new source may be set if needed, as usual. TODO: *Options need to be unset, not only when the source drawable is destroyed, but also when it's no longer available to the user: Currently (with the patch) the user may delete the layer where the source is set and still use the source tools to paint, as the source drawable isn't being destroyed. This behavior might be confusing for the user. Currently (with the patch) when the user tries to use a source that's been destroyed by closing its display, Gimp SEGFAULTS. *A new button on the stroke dialog called "Set source" was proposed and discussed on IRC. Currently it only switches the currently selected tool in the UI (not in the combo box in the dialog) to the clone tool. The idea is to enable such button only when a source kind of tool is selected in the combo box, and for this button to switch to such tool, and temporarily enter the "set source" mode by the use of modifiers. However, inducing a mode, while not impossible, is proving challenging for me to do in a clean way, and I'm afraid, the only way I can think of would affect the quality of the code. I'm open to any reasonable proposals to make the use of sources in the stroke dialog more intuitive/apparent for the user. *Review code formatting and programmatic errors. I'm really looking forward to learn by making the necessary changes. Last but not least, I'd like to thank all fellows who disinterestedly helped me, and are still helping on IRC. This is certainly proving to be not an easy task for a newcomer. Cheers, Eneko
Created attachment 319077 [details] [review] should work This one should fix the aforementioned errors. For all I know, it works fine, although I haven't attempted to test it from console or plug-ins. I encourage you to test it and report bugs here or on IRC to me (ecv). I've left the useless "set source" button out of this patch, so one should set the source using the clone or heal tool before stroking. I won't attempt to implement such feature anymore unless some interest is shown. I still don't know how many rules I've broken with my code, and I'm still looking forward to get a review of my patch and address all mistakes. Cheers, Eneko
Created attachment 319191 [details] [review] format review Updated to comply to format rules. I did my best effort, however some cases don't seem to be covered by the rules and there seem to be other unmentioned rules I tried to comply to. Still willing to get it reviewed and hear from maintainers about all that needs to be fixed.
Comment on attachment 319191 [details] [review] format review I got this applied to a local branch with some changes necessary to get it to build in master, will attach an updated patch.
Created attachment 346153 [details] [review] Updated patch
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/287.