mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-30 23:19:49 +00:00
Fix crash due to division by zero when locking two or three ValueSliders and one of them has the value of 0 and the user attempts to change it
This commit is contained in:
parent
9a5eb9720d
commit
3b8c63c4a6
|
@ -30,6 +30,7 @@ Built using Godot 3.5.2
|
|||
- Optimize canvas drawing by only updating it when the image(s) have changed. [ac6a4db43d9296ebc03e639d8199dd3878a25d86](https://github.com/Orama-Interactive/Pixelorama/commit/ac6a4db43d9296ebc03e639d8199dd3878a25d86)
|
||||
- Fix bug where using shortcuts to switch between frames also moved the selection, causing deletions.
|
||||
- Pxo files can now be loaded from the Open menu option in the Web version. [3dcc51705a999145e53a8e6d4de217dc03b0f147](https://github.com/Orama-Interactive/Pixelorama/commit/3dcc51705a999145e53a8e6d4de217dc03b0f147)
|
||||
- Fixed crash due to division by zero when locking two or three ValueSliders, and one of them has the value of 0 and the user attempts to change it.
|
||||
- Fixed exporting selected layers not including the non-selected frames.
|
||||
- The ellipse tool no longer produces gaps with large sizes. [4f3a7a305a264e0d2fe86c201af76eca4b2fea0a](https://github.com/Orama-Interactive/Pixelorama/commit/4f3a7a305a264e0d2fe86c201af76eca4b2fea0a)
|
||||
- Fix "visible layers" option on the export dialog producing wrong results. [346d1f071a8c6b1defb1072d39aea9c642f1ef59](https://github.com/Orama-Interactive/Pixelorama/commit/346d1f071a8c6b1defb1072d39aea9c642f1ef59)
|
||||
|
|
|
@ -343,7 +343,7 @@ config/icon="res://assets/graphics/icons/icon.png"
|
|||
config/macos_native_icon="res://assets/graphics/icons/icon.icns"
|
||||
config/windows_native_icon="res://assets/graphics/icons/icon.ico"
|
||||
config/custom_user_dir_name.X11="pixelorama"
|
||||
config/Version="v0.11.4-rc3"
|
||||
config/Version="v0.11.4-rc2"
|
||||
config/ExtensionsAPI_Version=3
|
||||
config/Pxo_Version=2
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ func _gcd(a: int, b: int) -> int:
|
|||
func _on_X_value_changed(val: float) -> void:
|
||||
value.x = val
|
||||
if _locked_ratio:
|
||||
self.value.y = max(min_value.y, (value.x / ratio.x) * ratio.y)
|
||||
if not is_zero_approx(ratio.x):
|
||||
self.value.y = max(min_value.y, (value.x / ratio.x) * ratio.y)
|
||||
if _can_emit_signal:
|
||||
emit_signal("value_changed", value)
|
||||
|
||||
|
@ -56,7 +57,8 @@ func _on_X_value_changed(val: float) -> void:
|
|||
func _on_Y_value_changed(val: float) -> void:
|
||||
value.y = val
|
||||
if _locked_ratio:
|
||||
self.value.x = max(min_value.x, (value.y / ratio.y) * ratio.x)
|
||||
if not is_zero_approx(ratio.y):
|
||||
self.value.x = max(min_value.x, (value.y / ratio.y) * ratio.x)
|
||||
if _can_emit_signal:
|
||||
emit_signal("value_changed", value)
|
||||
|
||||
|
|
|
@ -50,8 +50,9 @@ func _gcd(a: int, b: int) -> int:
|
|||
func _on_X_value_changed(val: float) -> void:
|
||||
value.x = val
|
||||
if _locked_ratio:
|
||||
self.value.y = max(min_value.y, (value.x / ratio.x) * ratio.y)
|
||||
self.value.z = max(min_value.z, (value.x / ratio.x) * ratio.z)
|
||||
if not is_zero_approx(ratio.x):
|
||||
self.value.y = max(min_value.y, (value.x / ratio.x) * ratio.y)
|
||||
self.value.z = max(min_value.z, (value.x / ratio.x) * ratio.z)
|
||||
if _can_emit_signal:
|
||||
emit_signal("value_changed", value)
|
||||
|
||||
|
@ -59,8 +60,9 @@ func _on_X_value_changed(val: float) -> void:
|
|||
func _on_Y_value_changed(val: float) -> void:
|
||||
value.y = val
|
||||
if _locked_ratio:
|
||||
self.value.x = max(min_value.x, (value.y / ratio.y) * ratio.x)
|
||||
self.value.z = max(min_value.z, (value.y / ratio.y) * ratio.z)
|
||||
if not is_zero_approx(ratio.y):
|
||||
self.value.x = max(min_value.x, (value.y / ratio.y) * ratio.x)
|
||||
self.value.z = max(min_value.z, (value.y / ratio.y) * ratio.z)
|
||||
if _can_emit_signal:
|
||||
emit_signal("value_changed", value)
|
||||
|
||||
|
@ -68,8 +70,9 @@ func _on_Y_value_changed(val: float) -> void:
|
|||
func _on_Z_value_changed(val: float) -> void:
|
||||
value.z = val
|
||||
if _locked_ratio:
|
||||
self.value.x = max(min_value.x, (value.z / ratio.z) * ratio.x)
|
||||
self.value.y = max(min_value.y, (value.z / ratio.z) * ratio.y)
|
||||
if not is_zero_approx(ratio.z):
|
||||
self.value.x = max(min_value.x, (value.z / ratio.z) * ratio.x)
|
||||
self.value.y = max(min_value.y, (value.z / ratio.z) * ratio.y)
|
||||
if _can_emit_signal:
|
||||
emit_signal("value_changed", value)
|
||||
|
||||
|
|
Loading…
Reference in a new issue