Fixed ellipse and rectangle colliders

This commit is contained in:
Yousef Khadadeh 2026-05-25 16:53:42 +03:00
parent c12cd14f6e
commit abfc259bc9
6 changed files with 91 additions and 13 deletions

View file

@ -39,7 +39,7 @@ class ToolConfiguration {
struct EllipseDrawToolConfig {
float relativeWidth = 15.0f;
int fillStrokeMode = 1;
unsigned fillStrokeMode = 1;
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(EllipseDrawToolConfig, relativeWidth, fillStrokeMode)
} ellipseDraw;

View file

@ -255,7 +255,7 @@ bool EraserTool::prevent_undo_or_redo() {
}
void EraserTool::draw(SkCanvas* canvas, const DrawData& drawData) {
if(!drawP.world.main.input.isTouchDevice && !drawData.main->g.gui.cursor_obstructed() && !erasePath.isEmpty()) {
if(!drawP.world.main.input.isTouchDevice && (!drawData.main->g.gui.cursor_obstructed() || isErasing) && !erasePath.isEmpty()) {
SkPaint linePaint;
linePaint.setAntiAlias(drawData.skiaAA);
linePaint.setColor4f({0.0f, 0.0f, 0.0f, 0.4f});