Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc Tool behaves strangely when dragging one end to the other and back again #472

Closed
Marian-Braendle opened this issue Jun 11, 2023 · 2 comments

Comments

@Marian-Braendle
Copy link

arc_tool_bug

Steps to Reproduce

  1. Create Arc
  2. Drag one end to the other and back again while holding the left mouse button
  3. Move the center of the arc

Context

  • Ipe 7.2.27
  • Ubuntu 22.04
@Marian-Braendle
Copy link
Author

This seems to fix the problem, but I'm not sure it's the right way to go:

diff --git a/src/ipe/lua/main.lua b/src/ipe/lua/main.lua
index 2e9d0da..80be492 100644
--- a/src/ipe/lua/main.lua
+++ b/src/ipe/lua/main.lua
@@ -156,6 +156,7 @@ function recomputeArcMatrix(seg, cpno)
   local p = ipe.Direction(alpha)
   local q = ipe.Direction(beta)
   local cl
+  if (seg[2]-seg[1]):sqLen() == 0 then return end
   if cpno == 1 then
     cl = ipe.LineThrough(V(0,0), q)
     p = seg.arc:matrix():inverse() * seg[cpno]

@otfried
Copy link
Owner

otfried commented Aug 5, 2023

Fixed in 7.2.28.

@otfried otfried closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants