diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 9eeebc6a4..2e429036c 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -6,7 +6,7 @@ Copyright (c) 2002-2024 Various contributors (see below, and AUTHORS.txt) https://tuxpaint.org/ -2024.January.21 (0.9.32) +2024.January.26 (0.9.32) * Improvements to Magic tools: ---------------------------- * Magic tool plugin API updates diff --git a/magic/src/trochoids.c b/magic/src/trochoids.c index 8899085c1..024a0a2b3 100644 --- a/magic/src/trochoids.c +++ b/magic/src/trochoids.c @@ -7,7 +7,7 @@ by Bill Kendrick with help from Pere Pujal Carabantes - January 6, 2024 - January 17, 2024 + January 6, 2024 - January 26, 2024 */ #include @@ -508,15 +508,6 @@ void trochoids_release(magic_api * api, int which, otherwise it will seem like the sound only happens intermittently) */ api->stopsound(); - /* If they clicked & released with no drag, - ignore the (x,y) we received; we want the - 'default' offset to get a reasonably pleasant - shape -- for users who tried clicking w/o dragging */ - if (dragged == 0) { - x += (canvas->w / 20); - y += (canvas->h / 20); - } - /* Pick which sound to play & play it */ tool = which_to_tool[which]; if (tool == TOOL_EPITROCHOID_SIZES || @@ -530,6 +521,23 @@ void trochoids_release(magic_api * api, int which, trochoids_sound(api, snd_idx, x, y); + /* If they clicked & released with no drag, + ignore the (x,y) we received; we want the + 'default' offset to get a reasonably pleasant + shape -- for users who tried clicking w/o dragging */ + if (dragged == 0) { + if (tool == TOOL_EPITROCHOID_SIZES || + tool == TOOL_EPITROCHOID_NOSIZES_1 || + tool == TOOL_EPITROCHOID_NOSIZES_2 || + tool == TOOL_EPITROCHOID_NOSIZES_3) { + x = trochoids_x + 50; + y = trochoids_y + 20; + } else { + x = trochoids_x + 70; + y = trochoids_y + 30; + } + } + /* Draw it (no guides, this time!) */ trochoids_work(api, which, canvas, snapshot, x, y, update_rect, 0); }