Skip to content

Commit 1a61dd0

Browse files
authored
Merge pull request #121 from simzer/main
Fixed line width animation when geometry is changing.
2 parents b55a219 + 32ad39f commit 1a61dd0

File tree

3 files changed

+62
-61
lines changed

3 files changed

+62
-61
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Marker guides switch off on polar scatterplots for performance purposes.
88
- Fixed unintentional size change of circle markers during polar-cartesian
99
coordinate system change.
10+
- Fixed line width animation when geometry is changing.
1011

1112
## [0.5.1] - 2022-07-14
1213

src/chart/rendering/drawitem.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ void drawItem::draw(
177177

178178
auto colors = getColor(drawItem, factor);
179179

180+
canvas.setLineColor(colors.first);
181+
canvas.setLineWidth(*style.plot.marker.borderWidth);
182+
canvas.setBrushColor(colors.second);
183+
180184
if (line)
181185
{
182186
if (events.plot.marker.base
@@ -189,17 +193,13 @@ void drawItem::draw(
189193
}
190194
else
191195
{
192-
canvas.setLineColor(colors.first);
193-
canvas.setLineWidth(
194-
*style.plot.marker.borderWidth);
195-
canvas.setBrushColor(colors.second);
196196
if (events.plot.marker.base
197197
->invoke(Events::OnRectDrawParam(drawItem.getBoundary())))
198198
{
199199
painter.drawPolygon(drawItem.points);
200200
}
201-
canvas.setLineWidth(0);
202201
}
202+
canvas.setLineWidth(0);
203203
}
204204

205205
void drawItem::drawLabel(const DrawItem &drawItem, size_t index)

0 commit comments

Comments
 (0)