1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-13 09:13:07 +00:00

Re-introduce is_syncing

This commit is contained in:
Emmanouil Papadeas 2024-10-16 12:18:16 +03:00
parent abedba6f64
commit acada6ef2c
2 changed files with 5 additions and 1 deletions

View file

@ -397,8 +397,10 @@ func attempt_config_share(from_idx: int, config: Dictionary = {}) -> void:
target_slot.tool_node.has_method("set_config")
and target_slot.tool_node.has_method("update_config")
):
target_slot.tool_node.set("is_syncing", true)
target_slot.tool_node.set_config(config)
target_slot.tool_node.update_config()
target_slot.tool_node.set("is_syncing", false)
func reset_options() -> void:

View file

@ -2,6 +2,7 @@ class_name BaseTool
extends VBoxContainer
var is_moving := false
var is_syncing := false
var kname: String
var tool_slot: Tools.Slot = null
var cursor_text := ""
@ -34,6 +35,7 @@ func _ready() -> void:
func save_config() -> void:
var config := get_config()
Global.config_cache.set_value(tool_slot.kname, kname, config)
if not is_syncing: # If the tool isn't busy syncing with another tool.
Tools.config_changed.emit(tool_slot.button, config)