Fixed path write issue

This commit is contained in:
Yousef Khadadeh 2026-05-29 09:47:55 +03:00
parent 8e4732c1e0
commit ca71dbd9d3
2 changed files with 6 additions and 6 deletions

View file

@ -84,9 +84,7 @@ void BrushTool::commit_data(bool final) {
MeshCanvasComponent& newMesh = static_cast<MeshCanvasComponent&>(containerPtr->get_comp());
newMesh.d.meshPath = BrushComponentCode::brush_stroke_to_skpath(genData.brushPoints, drawP.world.main.toolConfig.brush.hasRoundCaps);
if(final) {
std::optional<SkPath> simplified = Simplify(newMesh.d.meshPath);
if(simplified.has_value())
newMesh.d.meshPath = simplified.value();
containerPtr->get_comp().simplify_paths();
containerPtr->normalize_object_coordinates();
}
containerPtr->commit_update(drawP);