After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 562564 - Impossible stroke a path with the clone tool
Impossible stroke a path with the clone tool
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Tools
2.8.16
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-11-28 13:45 UTC by PhotoComiX
Modified: 2018-05-24 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
UNFINISHED (14.16 KB, patch)
2016-01-10 17:34 UTC, Eneko Castresana Vara
none Details | Review
should work (25.16 KB, patch)
2016-01-15 07:06 UTC, Eneko Castresana Vara
none Details | Review
format review (24.05 KB, patch)
2016-01-16 20:33 UTC, Eneko Castresana Vara
needs-work Details | Review
Updated patch (27.79 KB, patch)
2017-02-18 22:25 UTC, Michael Schumacher
none Details | Review

Description PhotoComiX 2008-11-28 13:45:49 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:
Comment 1 PhotoComiX 2008-11-28 14:17:13 UTC
 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"
Comment 2 Michael Schumacher 2008-12-18 10:27:09 UTC
Confirming. Does happen if you choose a source before opening the stroke dialog, too.
Comment 3 Ofnuts 2015-12-22 13:41:40 UTC
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.
Comment 4 Eneko Castresana Vara 2016-01-10 17:34:09 UTC
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
Comment 5 Eneko Castresana Vara 2016-01-15 07:06:17 UTC
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
Comment 6 Eneko Castresana Vara 2016-01-16 20:33:51 UTC
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 7 Michael Schumacher 2017-02-07 12:27:21 UTC
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.
Comment 8 Michael Schumacher 2017-02-18 22:25:31 UTC
Created attachment 346153 [details] [review]
Updated patch
Comment 9 GNOME Infrastructure Team 2018-05-24 12:28:25 UTC
-- 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.