mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Only update brush size config if size changed (#704)
This is the fix I proposed in #703 after noticing that the code in `update_config()` was being executed twice when changing the size of brushes.
This commit is contained in:
parent
0deac041e8
commit
06d591c7ad
|
@ -56,10 +56,11 @@ func _on_Brush_selected(brush: Brushes.Brush) -> void:
|
|||
|
||||
|
||||
func _on_BrushSize_value_changed(value: float) -> void:
|
||||
_brush_size = int(value)
|
||||
_cache_limit = (_brush_size * _brush_size) * 3 # This equation seems the best match
|
||||
update_config()
|
||||
save_config()
|
||||
if _brush_size != int(value):
|
||||
_brush_size = int(value)
|
||||
_cache_limit = (_brush_size * _brush_size) * 3 # This equation seems the best match
|
||||
update_config()
|
||||
save_config()
|
||||
|
||||
|
||||
func _on_InterpolateFactor_value_changed(value: float) -> void:
|
||||
|
|
Loading…
Reference in a new issue