Don't re-measure when the shift key is being pressed while a token is following the currently active ruler

This commit is contained in:
Manuel Vögele
2021-05-18 13:03:04 +02:00
parent e63ee1988d
commit a413d44795
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@
### Bugfixes ### Bugfixes
- Fixed a bug that sometimes measured diagonals incorrectly with the 5/10/5 grid rule - Fixed a bug that sometimes measured diagonals incorrectly with the 5/10/5 grid rule
- Fixed a bug that would cause the ruler to re-measure when the shift key is being pressed or released while a token is moving
### Compatibility ### Compatibility
- Drag Ruler's Generic Speed Provider is now aware of good default values for the Starfinder game system - Drag Ruler's Generic Speed Provider is now aware of good default values for the Starfinder game system
+2
View File
@@ -115,6 +115,8 @@ function onKeyShift(up) {
const ruler = canvas.controls.ruler const ruler = canvas.controls.ruler
if (!ruler.isDragRuler) if (!ruler.isDragRuler)
return false return false
if (ruler._state !== Ruler.STATES.MEASURING)
return false;
const mousePosition = canvas.app.renderer.plugins.interaction.mouse.getLocalPosition(canvas.tokens) const mousePosition = canvas.app.renderer.plugins.interaction.mouse.getLocalPosition(canvas.tokens)
const rulerOffset = ruler.rulerOffset const rulerOffset = ruler.rulerOffset