Bug 293036 - geometric tools don't fill anymore
Summary: geometric tools don't fill anymore
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: git master (please specify the git hash!)
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-01 11:27 UTC by Halla Rempt
Modified: 2012-02-04 17:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2012-02-01 11:27:25 UTC
Version:           svn trunk
OS:                Linux

The fill options in the geometric tools are all broken.

Reproducible: Didn't try

Steps to Reproduce:
Try to make filled star, ellipse, rectangle or polygon. None of the fill options work.

Actual Results:  
Unfilled raster shapes

Expected Results:  
Filled raster shapes
Comment 1 Halla Rempt 2012-02-01 14:12:45 UTC
Yeah: this commit 

644ec17dedb5c1f1178293ddb2788b21f2e997da

Broke fill for the geometric tools...
Comment 2 Halla Rempt 2012-02-01 14:56:33 UTC
KisToolShape had an overridden method setupPainter that would set the fill method on the painter. The tool's setupPainter (except for the fill and gradient tool, perhaps) is no longer used, but the methods haven't been removed anywhere, leading to confusion.

At the same time, the new KisResourcesSnapshot::setupPainter cannot access the fill method, since that's specific to KisShapeTool, so it doesn't set that. Result: no fill.
Comment 3 Dmitry Kazakov 2012-02-04 17:41:12 UTC
Git commit 89b23a997d1b671742f31eabdc449563ff65b01c by Dmitry Kazakov.
Committed on 04/02/2012 at 19:40.
Pushed by dkazakov into branch 'shapes-as-node-model-kazakov'.

Fix filling shapes bug

Now tools add the stroke/filling styles to the resources snapshot
and it setups the painter in right way.

I removed all the KisTool.*::setupPainter() methods. They are not
used from now on.

I also tried to remove KisTool.*::setupPaintAction(), because the
actions should be merged in a single class (based on
KisRecorderPathPaintAction) which would handle the following operations:

paintAt
paintLine
paintPolyline
paintCurve
paintPolygon (-)
paintRect (-)
paintEllipse (-)
paintPainterPath (-)

The methods marked with (-) are currently absent in
KisRecorderPathPaintAction, so when they are implemented we can remove
setupPaintAction() functions and use KisRecorderAdepter as we already do
in KisToolFreehand.

M  +3    -1    krita/plugins/tools/defaulttools/kis_tool_ellipse.cc
M  +8    -1    krita/plugins/tools/defaulttools/kis_tool_fill.cc
M  +8    -1    krita/plugins/tools/defaulttools/kis_tool_gradient.cc
M  +3    -1    krita/plugins/tools/defaulttools/kis_tool_line.cc
M  +3    -1    krita/plugins/tools/defaulttools/kis_tool_path.cc
M  +3    -1    krita/plugins/tools/defaulttools/kis_tool_rectangle.cc
M  +3    -1    krita/plugins/tools/tool_polygon/kis_tool_polygon.cc
M  +3    -1    krita/plugins/tools/tool_polyline/kis_tool_polyline.cc
M  +3    -1    krita/plugins/tools/tool_star/kis_tool_star.cc
M  +6    -1    krita/ui/tool/kis_figure_painting_tool_helper.cpp
M  +3    -1    krita/ui/tool/kis_figure_painting_tool_helper.h
M  +28   -1    krita/ui/tool/kis_resources_snapshot.cpp
M  +4    -0    krita/ui/tool/kis_resources_snapshot.h
M  +0    -17   krita/ui/tool/kis_tool.cc
M  +0    -3    krita/ui/tool/kis_tool.h
M  +0    -15   krita/ui/tool/kis_tool_paint.cc
M  +0    -3    krita/ui/tool/kis_tool_paint.h
M  +0    -7    krita/ui/tool/kis_tool_shape.cc
M  +0    -1    krita/ui/tool/kis_tool_shape.h

http://commits.kde.org/calligra/89b23a997d1b671742f31eabdc449563ff65b01c