Skip to content

Commit

Permalink
Prevent division by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
HellAholic committed Feb 7, 2025
1 parent dcd875b commit a967362
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/Tools/RotateTool/RotateTool.qml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ Item
var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values
if(text != "")
{
var value = parseFloat(modified_text)
if (value === 0)
{
text = snapText; // Revert to previous valid value
return;
}
UM.Controller.setProperty("RotationSnapAngle", modified_text)
}
}
Expand Down

0 comments on commit a967362

Please sign in to comment.