Bug 373846

Summary: Cannot create a new stamp brush if the brush editor shows the no-brush selected icon
Product: [Applications] krita Reporter: David REVOY <info>
Component: Brush enginesAssignee: vanyossi <ghevan>
Status: RESOLVED FIXED    
Severity: normal CC: freebox64, halla, landchuckz, scottpetrovic
Priority: NOR    
Version: 3.1.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description David REVOY 2016-12-18 17:09:13 UTC
Hi,
The button "+Stamp" in brush-editor>Pixel>Brush-tip>Predefined is broken in 3.1.

# How to reproduce:
- Open a new document
- Add a new layer
- Paint a little shape
- Select the shape ( rectangular selection around it )
- Open the brush-editor
- in brush-editor>Pixel>Brush-tip>Predefined press the button "+Stamp"

# Result:
- The preview proposed in the dialog is empty
- The selection do not send the bitmap to "+Stamp"
- If no selection, "+Stamp" doesn't take the full image too
- Impossible to create a brush-tip with it

# Workaround:
- Use 'Clipboard' button ( and press Ctrl+C on the selection prior using this button ).

Note: affect this video tutorial (3:30) : http://www.davidrevoy.com/article313/custom-brushes-stencil-stamps-with-krita , https://youtu.be/fgA4BcO3Nq8

Reproductible on Git~krita/3.1, appimage 3.0.94, appimage 3.0.92, appimage alpha 3.0.1
Comment 1 mvowada 2016-12-18 20:54:46 UTC
Hi David, I can reproduce what you described in Krita 3.1.1 too.
(The '+Stamp' button doesn't take the selected area on canvas while the 'Clipboard' workaround, well, it works).
Comment 2 mvowada 2016-12-18 20:57:59 UTC
(Krita 3.1.1 appimage btw, on Ubuntu 14.04). Confirming.
Comment 3 Halla Rempt 2016-12-22 11:09:36 UTC
This was already broken in 3.0.
Comment 4 Halla Rempt 2016-12-22 11:12:51 UTC
It only happens if you haven't selected another preset after creating a new image.
Comment 5 Halla Rempt 2016-12-22 11:26:30 UTC
Git commit 65caf8179bb0733faf401eaa5b39a78876f1ef5f by Boudewijn Rempt.
Committed on 22/12/2016 at 11:25.
Pushed by rempt into branch 'master'.

If you'd create an image, and then without changing brush preset
would try to use that image as a new stamp, it would fail because
the preset editor was initialized before the image was added to
to the viewmanager.

M  +29   -26   libs/ui/KisViewManager.cpp

https://commits.kde.org/krita/65caf8179bb0733faf401eaa5b39a78876f1ef5f
Comment 6 Halla Rempt 2016-12-22 11:26:37 UTC
Git commit c5dd867fa2a043459a86162021d3cc3f14bc041e by Boudewijn Rempt.
Committed on 22/12/2016 at 11:26.
Pushed by rempt into branch 'krita/3.1'.

If you'd create an image, and then without changing brush preset
would try to use that image as a new stamp, it would fail because
the preset editor was initialized before the image was added to
to the viewmanager.

M  +28   -25   libs/ui/KisViewManager.cpp

https://commits.kde.org/krita/c5dd867fa2a043459a86162021d3cc3f14bc041e
Comment 7 David REVOY 2017-02-15 10:49:17 UTC
Hi, 
It's impossible to open a document, go to brush-editor, and click on 'stamp' to make an animated brush out of this document : the result will always be an empty preview in the stamp dialog. The 'Stamp' button will works (tested in Krita 3.1.2appimage) only after cliking on a brush preset in the brush docker first. So, I'm reopening this bug-report.
Comment 8 Scott Petrovic 2017-03-14 16:37:38 UTC
I did a fix a bit ago that should solve David's last comment. I didn't see this ticket to link to it. I am on master now and can do the following:

1. Start Krita and open a document
2. go to the brush editor and go to the predefined brush tip area
3. select "+ stamp" option

The image preview now appears with the entire image (since there is no selection).
Comment 9 Halla Rempt 2017-06-05 09:20:21 UTC
*** Bug 379015 has been marked as a duplicate of this bug. ***
Comment 10 vanyossi 2019-06-14 18:06:45 UTC
David reports that this no longer happens. I tested in 4.2.1 with positive results

marking as fixed.