Bug 299701 - Deform brush engine behave like if the option "Use undeformed image" is always ON, regardless of the checkbox state
Summary: Deform brush engine behave like if the option "Use undeformed image" is alway...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-09 19:23 UTC by ALeXeY
Modified: 2012-08-30 20:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ALeXeY 2012-05-09 19:23:26 UTC
The "Use undeformed image" checkbox in the Deform brush default preset is OFF (unchecked), but the brush actually behave as if that parameter is ON. Check/uncheck it has no effect. The same is true for an existing presets.

Reproducible: Always

Steps to Reproduce:
1. Build Calligra/Krita from git master revisions above 910a4458...
2. Go to Brush settings window and select Deform brush.
3. Go to Deform Options, notice the "Use undeformed image" checkbox is unchecked.
4. Try the brush. 
Actual Results:  
Deform brush behave like if the option "Use undeformed image" is always ON.

Expected Results:  
Deform brush behave accordingly the state of the "Use undeformed image" checkbox, and specifically, NOT undeformed image when the appropriate checkbox switched OFF.

Appears in all latest git master versions, starting with the big merge 5977effb17d6286651f9f9ad8a267cdb5ca7b9be.

So, the commit 910a44580c0fcc790cc351d905a8aca6392b4364 is the last one, that has not this bug appearance.
Comment 1 Halla Rempt 2012-05-12 07:05:46 UTC
Hi Alexey,

Thanks for your report. I can confirm the bug -- I wonder whether it is caused by my iterators ng merge last week... We will have to investigate.
Comment 2 LukasT 2012-05-14 07:09:56 UTC
It might, it uses oldRawData to deform image when "Use undeformed image" is checked, rawData otherwise
Comment 3 Halla Rempt 2012-05-14 07:28:33 UTC
Yeah, and there's a bit of difference in the meaning of const/nont const and rawData and oldRawdata in the ng iterators vs the old iterators, I had to fix up issues there in other places as well.

If so, it should be easy enough to fix.
Comment 4 Sven Langkamp 2012-07-14 00:38:27 UTC
It was the iterators ng change:
-
-    if (m_properties->useOldData) {
-        m_srcAcc->sampledOldRawData(dst);
-    } else {
-        m_srcAcc->sampledRawData(dst);
-    }
+    // here there was a switch to select between new and old sampled data, but the
+    // sub accessor always used a const accessor, which means that there was no
+    // difference.
+    m_srcAcc->sampledOldRawData(dst);
Comment 5 LukasT 2012-08-30 20:04:29 UTC
Git commit bd42a11750417fe065067b383531c8370a7f38f6 by Lukáš Tvrdý.
Committed on 30/08/2012 at 21:52.
Pushed by lukast into branch 'calligra/2.5'.

Fix deform brush painting

Bring back some removed code from iteratorsNG porting
o provide sampledRawData in KisRandomSubAccessor
FIXED-IN:2.5.2
REVIEW:106222

M  +28   -2    krita/image/kis_random_sub_accessor.cpp
M  +7    -2    krita/image/kis_random_sub_accessor.h
M  +14   -13   krita/plugins/paintops/deform/deform_brush.cpp

http://commits.kde.org/calligra/bd42a11750417fe065067b383531c8370a7f38f6
Comment 6 LukasT 2012-08-30 20:08:18 UTC
Git commit 7e499ddf9bcae682369a2395a6be6bb1e5d02e2a by Lukáš Tvrdý.
Committed on 30/08/2012 at 21:52.
Pushed by lukast into branch 'master'.

Fix deform brush painting

Bring back some removed code from iteratorsNG porting
o provide sampledRawData in KisRandomSubAccessor
FIXED-IN:2.5.2
REVIEW:106222

M  +28   -2    krita/image/kis_random_sub_accessor.cpp
M  +7    -2    krita/image/kis_random_sub_accessor.h
M  +14   -13   krita/plugins/paintops/deform/deform_brush.cpp

http://commits.kde.org/calligra/7e499ddf9bcae682369a2395a6be6bb1e5d02e2a